Bug 420571 - sk_prot->sendmsg(...) causes kernel oops
sk_prot->sendmsg(...) causes kernel oops
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
8
i686 Linux
low Severity high
: ---
: ---
Assigned To: Kernel Maintainer List
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-12-11 16:15 EST by Kevin
Modified: 2007-12-11 16:51 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-12-11 16:39:11 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
The syslog of the kernel oops (6.31 KB, text/plain)
2007-12-11 16:17 EST, Kevin
no flags Details

  None (edit)
Description Kevin 2007-12-11 16:15:30 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.8) Gecko/20071015 SUSE/2.0.0.8-1.1 Firefox/2.0.0.8

Description of problem:


Version-Release number of selected component (if applicable):
anything beyond kernel-2.6.20

How reproducible:
Always


Steps to Reproduce:
You would need our driver code which I would be happy to send.

Essentially the following code is failing at sendmsg(...):

int rc;
struct iovec iov;
struct msghdr msg;
mm_segment_t oldfs;

iov.iov_base = si->tcp_k_wbuf;
iov.iov_len = len;
msg.msg_name = NULL;
msg.msg_iov = &iov;
msg.msg_iovlen = 1;
msg.msg_control = NULL;
msg.msg_flags = 0;

oldfs = get_fs(); 
set_fs(KERNEL_DS);

rc = si->tcp_sk->sk_prot->sendmsg(NULL, si->tcp_sk, &msg, len);

si->tcp_sk is a socket (struct sock *tcp_sk) established earlier in userland and passed down to the driver. The socket passes all kinds of checks to ensure it is good. For whatever reason this bombs after a connection is made to the remote host. 

Actual Results:
Kernel Oops

Expected Results:
no oops

Additional info:
As I said before, this code works without issue on 2.6.20 and earlier kernels. Since the skbuff changes were made to the kernel this sendmsg cmd bombs.
Comment 1 Kevin 2007-12-11 16:17:45 EST
Created attachment 284661 [details]
The syslog of the kernel oops
Comment 2 Tom "spot" Callaway 2007-12-11 16:23:52 EST
Not sure why this got filed against R. Moving to kernel.
Comment 3 Kevin 2007-12-11 16:29:44 EST
>>why this got filed against R.

Me neither, I didn't select a component because I couldn't find "kernel" in the
list.

Also, I search high and low on implementation gotchas and what not for the skbuf
changes but couldn't find anything that pointed to why sendmsg() wouldn't work
as it normally would in the past. The driver compiles and inserts clean. I
believe the socket even connects to the remote host before it causes the oops.
Comment 4 Chuck Ebbert 2007-12-11 16:39:11 EST
Sorry, we can't help with general kernel driver writing. Post your questions to
the netdev mailing list: netdev@vger.kernel.org
Comment 5 Kevin 2007-12-11 16:51:14 EST
I search that list for this issue and it turned up nothing. But I'll subscribe
to yet another kernel list and see what they come back with.

Note You need to log in before you can comment on or make changes to this bug.