Re: BUG: scheduling while atomic

From: Alan Cox
Date: Sat Jun 27 2009 - 09:05:38 EST


On Sat, 27 Jun 2009 13:10:23 +0200
Michael Guntsche <mike@xxxxxxxxxxxx> wrote:

> Hello list, Alan,
>
> I got the same error with pptpgw as Sergey after switching form
> 2.6.30 to recent git (rc1).

Yes - I've no idea what is going on with the pptpgw traces at the moment.

The path is

pptpgw reads from the tty side (it uses a pty/tty pair and runs
ppp over it)

This calls the ldisc n_tty_read
We copy some data and this makes room in the buffers
ww call check_unthrottle (with no spinlocks held)
This decides that thre is now room to ask the other end
to send more
which calls tty_unthrottle (which takes only a mutex)
which calls pty_unthrottle
which wakes the other side of the pty/tty pair for writing
this calls the ppp ldisc wakeup handler for the other side
which blows up somewhere around the tasklet code for no reason I
can make sense of yet


and all of this should be (and seems to be) getting called with sleeping
allowed and no spinlocks taken in error.

You could stuff calls to might_sleep() in pty_unthrottle and
check_unthrottle and see which ones are triggered if any.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/