mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] loop: fix double BKL lock
@ 2010-09-11 15:54 Arnd Bergmann
  0 siblings, 0 replies; only message in thread
From: Arnd Bergmann @ 2010-09-11 15:54 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-kernel

Patch 6e9624b8c "block: push down BKL into .open and .release"
accidentally introduced an extra lock_kernel() instead of
unlock_kernel(). Because of the recursiveness and
release-while-sleeping properties of the BKL, this did
not do much harm, but is incorrect nonetheless.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---

Please apply before 2.6.36

 drivers/block/loop.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 91797bb..d311e38 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -1448,7 +1448,7 @@ static int lo_release(struct gendisk *disk, fmode_t mode)
 out:
 	mutex_unlock(&lo->lo_ctl_mutex);
 out_unlocked:
-	lock_kernel();
+	unlock_kernel();
 	return 0;
 }
 
-- 
1.7.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-09-11 15:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-11 15:54 [PATCH] loop: fix double BKL lock Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®