http://bugzilla.suse.com/show_bug.cgi?id=1025066
Bug ID: 1025066
Summary: fs/super.c: fix race between freeze_super() and
thaw_super()
Classification: openSUSE
Product: openSUSE Distribution
Version: Leap 42.1
Hardware: Other
OS: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Kernel
Assignee: jeffm@suse.com
Reporter: jeffm@suse.com
QA Contact: qa-bugs@suse.de
Found By: ---
Blocker: ---
From: Oleg Nesterov
Date: Mon, 26 Sep 2016 18:07:48 +0200
Subject: fs/super.c: fix race between freeze_super() and thaw_super()
Git-commit: 89f39af129382a40d7cd1f6914617282cfeee28e
Patch-mainline: v4.9-rc1
References: revisit
Change thaw_super() to check frozen != SB_FREEZE_COMPLETE rather than
frozen == SB_UNFROZEN, otherwise it can race with freeze_super() which
drops sb->s_umount after SB_FREEZE_WRITE to preserve the lock ordering.
In this case thaw_super() will wrongly call s_op->unfreeze_fs() before
it was actually frozen, and call sb_freeze_unlock() which leads to the
unbalanced percpu_up_write(). Unfortunately lockdep can't detect this,
so this triggers misc BUG_ON()'s in kernel/rcu/sync.c.
Reported-and-tested-by: Nikolay Borisov
Signed-off-by: Oleg Nesterov
Cc: stable@vger.kernel.org
Signed-off-by: Al Viro
Acked-by: Jeff Mahoney
---
fs/super.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--
You are receiving this mail because:
You are on the CC list for the bug.