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>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 27 Apr 2009 22:22:28 +0200
From:	Alessio Igor Bogani <abogani@...ware.it>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	Jonathan Corbet <corbet@....net>,
	Frédéric Weisbecker <fweisbec@...il.com>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	LKML <linux-kernel@...r.kernel.org>,
	Alessio Igor Bogani <abogani@...ware.it>
Subject: [PATCH -tip:kill-the-BKL] remove the BKL: remove "BKL auto-drop" assumption from ext3_remount()

Fix ext3_remount()'s "schedule() drops the BKL automatically" assumption,
when ext3_mark_recovery_complete(), which can sleep, does not do that it can
lock up.

Signed-off-by: Alessio Igor Bogani <abogani@...ware.it>
---
 fs/ext3/super.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/fs/ext3/super.c b/fs/ext3/super.c
index dc905f9..5d61a7f 100644
--- a/fs/ext3/super.c
+++ b/fs/ext3/super.c
@@ -2503,6 +2503,7 @@ static int ext3_remount (struct super_block * sb, int * flags, char * data)
 #ifdef CONFIG_QUOTA
 	int i;
 #endif
+	int bkl = kernel_locked();
 
 	/* Store the original options */
 	old_sb_flags = sb->s_flags;
@@ -2561,9 +2562,13 @@ static int ext3_remount (struct super_block * sb, int * flags, char * data)
 			 * We have to unlock super so that we can wait for
 			 * transactions.
 			 */
+			if (bkl)
+				unlock_kernel();
 			unlock_super(sb);
 			ext3_mark_recovery_complete(sb, es);
 			lock_super(sb);
+			if (bkl)
+				lock_kernel();
 		} else {
 			__le32 ret;
 			if ((ret = EXT3_HAS_RO_COMPAT_FEATURE(sb,
-- 
1.6.0.4

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