public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: sebek64@post.cz (Marcel Sebek)
Cc: linux-kernel@vger.kernel.org, Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: [2.6.9-rc3-bk1] Sleeping function called from invalid context
Date: Fri, 1 Oct 2004 20:56:58 -0700	[thread overview]
Message-ID: <20041001205658.7c2b8ecf.akpm@osdl.org> (raw)
In-Reply-To: <20041001203505.GA4480@penguin.localdomain>

sebek64@post.cz (Marcel Sebek) wrote:
>
> I upgraded from 2.6.8-rc2-bk10.
>  When I run pppd, a lot of debug messages are typed out.
>  pppd uses /dev/ttyUSB0 as serial device (driver ftdi_sio).
> 
>  My .config is at http://wremcont.mysteria.cz/config-2.6.9-rc3-bk1
>  Kernel debug output is at http://wremcont.mysteria.cz/messages-2.6.9-rc3-bk1

OK, we have a problem.

Debug: sleeping function called from invalid context at mm/slab.c:2052
in_atomic():1, irqs_disabled():1
[__might_sleep+180/224] __might_sleep+0xb4/0xe0
[pg0+273102006/1069224960] hcd_submit_urb+0x106/0x190 [usbcore]
[kmem_cache_alloc+91/96] kmem_cache_alloc+0x5b/0x60
[pg0+273105606/1069224960] usb_control_msg+0x36/0xa0 [usbcore]
[pg0+272960692/1069224960] ftdi_set_termios+0x144/0x5f0 [ftdi_sio]
[pg0+273029492/1069224960] serial_set_termios+0x44/0xa0 [usbserial]
[tty_wait_until_sent+215/240] tty_wait_until_sent+0xd7/0xf0
[change_termios+480/528] change_termios+0x1e0/0x210
[set_termios+227/288] set_termios+0xe3/0x120
[tty_ioctl+1025/1248] tty_ioctl+0x401/0x4e0
[sys_ioctl+233/608] sys_ioctl+0xe9/0x260
[sysenter_past_esp+82/113] sysenter_past_esp+0x52/0x71
bad: scheduling while atomic!

In rc3 change_termios() was altered so that it calls
(*tty->driver->set_termios)() under spin_lock_irqsave(tty_termios_lock).

But ftdi_set_termios() wants to perform USB I/O, which involves sleeping
allocations all over the place.

There may be other ->set_termios() implementations which want to sleep, too.

  reply	other threads:[~2004-10-02  3:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-01 20:35 [2.6.9-rc3-bk1] Sleeping function called from invalid context Marcel Sebek
2004-10-02  3:56 ` Andrew Morton [this message]
2004-10-02 19:08   ` Linus Torvalds
2004-10-02 18:57     ` Alan Cox

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=20041001205658.7c2b8ecf.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sebek64@post.cz \
    /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