Netdev List
 help / color / mirror / Atom feed
* call to schedule_timeout() with wrong state in af_inet.c
@ 2007-07-07 18:44 Robert P. J. Day
  0 siblings, 0 replies; only message in thread
From: Robert P. J. Day @ 2007-07-07 18:44 UTC (permalink / raw)
  To: netdev


  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
========================================================================

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-07-07 18:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-07 18:44 call to schedule_timeout() with wrong state in af_inet.c Robert P. J. Day

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox