Netdev List
 help / color / mirror / Atom feed
From: "Robert P. J. Day" <rpjday@mindspring.com>
To: netdev@vger.kernel.org
Subject: call to schedule_timeout() with wrong state in af_inet.c
Date: Sat, 7 Jul 2007 14:44:02 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0707071429050.3832@localhost.localdomain> (raw)


  based on a trivial check i added to kernel/timer.c, it seems that
schedule_timeout() is being called with a current state of
TASK_RUNNING, which shouldn't happen.  this appears to be the
offending snippet of code:

net/ipv4/af_inet.c (inet_wait_for_connect)
==========================================
...
while ((1 << sk->sk_state) & (TCPF_SYN_SENT | TCPF_SYN_RECV)) {
                release_sock(sk);
                timeo = schedule_timeout(timeo);
                lock_sock(sk);
...

  at least, that's what *seems* to be the problem, based on dumping
the hex address and checking it against /proc/kallsyms.

  the diagnostic shows up whenever i run fetchmail, for instance:

Jul  7 14:42:07 localhost kernel: Bad schedule_timeout state: 0 from fetchmail, c0388732

  that last value is the value of __builtin_return_address(0), and i
cross-checked that against /proc/kallsyms:
...
c038845d T inet_bind
c0388615 T inet_stream_connect
c0388814 T inet_accept
c03888b5 T inet_sock_destruct
...

rday
-- 
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://fsdev.net/wiki/index.php?title=Main_Page
========================================================================

                 reply	other threads:[~2007-07-07 18:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=Pine.LNX.4.64.0707071429050.3832@localhost.localdomain \
    --to=rpjday@mindspring.com \
    --cc=netdev@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