Bug 420571 - sk_prot->sendmsg(...) causes kernel oops
Summary: sk_prot->sendmsg(...) causes kernel oops
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 8
Hardware: i686
OS: Linux
low
high
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-12-11 21:15 UTC by Kevin
Modified: 2007-12-11 21:51 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2007-12-11 21:39:11 UTC
Type: ---
Embargoed:


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

Description Kevin 2007-12-11 21:15:30 UTC
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 21:17:45 UTC
Created attachment 284661 [details]
The syslog of the kernel oops

Comment 2 Tom "spot" Callaway 2007-12-11 21:23:52 UTC
Not sure why this got filed against R. Moving to kernel.

Comment 3 Kevin 2007-12-11 21:29:44 UTC
>>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 21:39:11 UTC
Sorry, we can't help with general kernel driver writing. Post your questions to
the netdev mailing list: netdev.org

Comment 5 Kevin 2007-12-11 21:51:14 UTC
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.