Red Hat Bugzilla – Bug 420571
sk_prot->sendmsg(...) causes kernel oops
Last modified: 2007-12-11 16:51:14 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:188.8.131.52) Gecko/20071015 SUSE/184.108.40.206-1.1 Firefox/220.127.116.11
Description of problem:
Version-Release number of selected component (if applicable):
anything beyond kernel-2.6.20
Steps to Reproduce:
You would need our driver code which I would be happy to send.
Essentially the following code is failing at sendmsg(...):
struct iovec iov;
struct msghdr msg;
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();
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.
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.
Created attachment 284661 [details]
The syslog of the kernel oops
Not sure why this got filed against R. Moving to kernel.
>>why this got filed against R.
Me neither, I didn't select a component because I couldn't find "kernel" in the
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.
Sorry, we can't help with general kernel driver writing. Post your questions to
the netdev mailing list: firstname.lastname@example.org
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.