public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "captain smp" <captainsmp@hotmail.com>
To: linux-kernel@vger.kernel.org
Subject: sock_sendmsg() from a kernel thread question
Date: Tue, 02 Oct 2001 21:10:54 +0000	[thread overview]
Message-ID: <F283XKGoyufRev86cl300004950@hotmail.com> (raw)

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


             reply	other threads:[~2001-10-02 21:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-02 21:10 captain smp [this message]
     [not found] <mailman.1002057181.10060.linux-kernel2news@redhat.com>
2001-10-02 21:56 ` sock_sendmsg() from a kernel thread question Pete Zaitcev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=F283XKGoyufRev86cl300004950@hotmail.com \
    --to=captainsmp@hotmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox