diff options
| author | Oleg Nesterov <[email protected]> | 2016-09-26 16:07:48 +0000 |
|---|---|---|
| committer | Al Viro <[email protected]> | 2016-10-15 00:00:34 +0000 |
| commit | 89f39af129382a40d7cd1f6914617282cfeee28e (patch) | |
| tree | 01c7ce34eda659481fba92293365b3a07c725d16 /lib/debugobjects.c | |
| parent | overlayfs: Fix setting IOP_XATTR flag (diff) | |
| download | kernel-89f39af129382a40d7cd1f6914617282cfeee28e.tar.gz kernel-89f39af129382a40d7cd1f6914617282cfeee28e.zip | |
fs/super.c: fix race between freeze_super() and thaw_super()
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 <[email protected]>
Signed-off-by: Oleg Nesterov <[email protected]>
Cc: [email protected]
Signed-off-by: Al Viro <[email protected]>
Diffstat (limited to 'lib/debugobjects.c')
0 files changed, 0 insertions, 0 deletions
