]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[PATCH] uml: fix proc-vs-interrupt context spinlock deadlock
authorPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Wed, 27 Sep 2006 08:50:31 +0000 (01:50 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 27 Sep 2006 15:26:15 +0000 (08:26 -0700)
commit48af05ed54ddf8dc6eceea4f009e063d7e784b37
tree4960c5a2ed9a3a04c4423317824aad9af6075880
parent06837504de7b4883e92af207dbbab4310d0db0ed
[PATCH] uml: fix proc-vs-interrupt context spinlock deadlock

This spinlock can be taken on interrupt too, so spin_lock_irq[save] must be
used.

However, Documentation/networking/netdevices.txt explains we are called with
rtnl_lock() held - so we don't need to care about other concurrent opens.
Verified also in LDD3 and by direct checking.  Also verified that the network
layer (through a state machine) guarantees us that nobody will close the
interface while it's being used.  Please correct me if I'm wrong.

Also, we must check we don't sleep with irqs disabled!!!  But anyway, this is
not news - we already can't sleep while holding a spinlock.  Who says this is
guaranted really by the present code?

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/um/drivers/net_kern.c