Re: [2.6.9-rc3-bk1] Sleeping function called from invalid context

From: Alan Cox
Date: Sat Oct 02 2004 - 15:01:49 EST


On Sad, 2004-10-02 at 20:08, Linus Torvalds wrote:
> We might be able to change it to a per-tty semaphore instead, which sounds
> reasonably safe, but in the meantime I don't think we have any other
> choice than to just leave the driver/ldisc routines unprotected. They
> should be just reading the state, after all.

Yep - already discussed on the linux-kernel and linux-usb lists. You can
do it with a semaphore. Its currently in testing. The USB drivers need
to sleep in order to handle the fact that their change is an
asynchronous message.

We do actually have to lock it or some drivers crash when you do the
fork 100 processes and all keep doing termios stuff attack.

Will send you a patch once its finished the test runs

Alan

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