[lkml]   [2001]   [Oct]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subjectsock_sendmsg() from a kernel thread question
I am trying to call sock_sendmsg() from a kernel thread
and it seems to work fine on a UP system but on SMP system
it hangs up and the thread can't even accept a SIGKILL.
It it stuck after the following calls happen:


then tcp_do_sendmsg() calls:

skb = sock_wmalloc(sk, tmp, 0, GFP_KERNEL);

but that call never returns. It doesn't get to
the code where the comment says: "If we didn't get
any memory, we need to sleep."

I've mucked with sock->sk->allocation flavors but to no avail.

BTW, this is 2.2.16-22 (stock red hat 6.2 kernel)

Is this fixed in later kernels, or is there some semaphore/spinlock
needed to call sock_sendmsg()/recvmsg() from kernel threads?

Is there a race with skbuff allocation/deallocation from the
NET_BH network bottom half handler or NIC interrupt handler
that I can prevent from happening somehow?


Get your FREE download of MSN Explorer at

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:03    [W:0.028 / U:1.796 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site