]> git.hungrycats.org Git - linux/commit
[PATCH] uml: fix ubd deadlock on SMP
authorPaolo \'Blaisorblade\' Giarrusso <blaisorblade_spam@yahoo.it>
Wed, 13 Oct 2004 14:31:09 +0000 (07:31 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Wed, 13 Oct 2004 14:31:09 +0000 (07:31 -0700)
commit83c4388af1373c62cf4bb5ce2e1c2e1ad0e1af1a
treef87f9cdd5a48132bf8249aec665c68f91f168cf1
parent5317e9c0ccf0f97cea710f9fa684bcde79d54040
[PATCH] uml: fix ubd deadlock on SMP

From: BlaisorBlade <blaisorblade_spam@yahoo.it>, Chris Wright <chrisw@osdl.org>

Avoid deadlocking onto the request lock in the UBD driver, i.e.  don't lock
the queue spinlock when called from the request function.

In detail:

Rename ubd_finish() to __ubd_finish() and remove ubd_io_lock from it.  Add
wrapper, ubd_finish(), which grabs lock before calling __ubd_finish().  Update
do_ubd_request to use the lock free __ubd_finish() to avoid deadlock.  Also,
apparently prepare_request is called with ubd_io_lock held, so remove locks
there.

Signed-off-by: Chris Wright <chrisw@osdl.org>
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/um/drivers/ubd_kern.c