ext4: avoid race conditions when remounting with options that change dax
authorTheodore Ts'o <tytso@mit.edu>
Wed, 10 Jun 2020 15:16:37 +0000 (11:16 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Jun 2020 15:50:48 +0000 (17:50 +0200)
commitffa9206a62d3894d2a8580bf106db55a85cfb013
treee71988cd3c3316f8e6f8be7487829e494cbff5c1
parent0804b23d2ff15f6656d70291d5e07677ca897881
ext4: avoid race conditions when remounting with options that change dax

[ Upstream commit 829b37b8cddb1db75c1b7905505b90e593b15db1 ]

Trying to change dax mount options when remounting could allow mount
options to be enabled for a small amount of time, and then the mount
option change would be reverted.

In the case of "mount -o remount,dax", this can cause a race where
files would temporarily treated as DAX --- and then not.

Cc: stable@kernel.org
Reported-by: syzbot+bca9799bf129256190da@syzkaller.appspotmail.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/ext4/super.c