* sock_sendmsg() from a kernel thread question
@ 2001-10-02 21:10 captain smp
0 siblings, 0 replies; 2+ messages in thread
From: captain smp @ 2001-10-02 21:10 UTC (permalink / raw)
To: linux-kernel
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:
sock_sendmsg()
sock->ops->sendmsg()
tcp_do_sendmsg()
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?
-Captain
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: sock_sendmsg() from a kernel thread question
[not found] <mailman.1002057181.10060.linux-kernel2news@redhat.com>
@ 2001-10-02 21:56 ` Pete Zaitcev
0 siblings, 0 replies; 2+ messages in thread
From: Pete Zaitcev @ 2001-10-02 21:56 UTC (permalink / raw)
To: captainsmp, linux-kernel
> 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:
>
> sock_sendmsg()
> sock->ops->sendmsg()
> tcp_do_sendmsg()
Always worked fine for me. I think something is up with
your code. Care to post a relevant snippet?
-- Pete
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-10-02 21:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.1002057181.10060.linux-kernel2news@redhat.com>
2001-10-02 21:56 ` sock_sendmsg() from a kernel thread question Pete Zaitcev
2001-10-02 21:10 captain smp
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox