lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <201009111754.59381.arnd@arndb.de>
Date:	Sat, 11 Sep 2010 17:54:59 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	Jens Axboe <jaxboe@...ionio.com>
Cc:	linux-kernel@...r.kernel.org
Subject: [PATCH] loop: fix double BKL lock

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@...db.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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ