]> git.baikalelectronics.ru Git - kernel.git/commit
quota: Fix possible corruption of dqi_flags
authorJan Kara <jack@suse.cz>
Fri, 9 Jun 2017 09:56:06 +0000 (11:56 +0200)
committerJan Kara <jack@suse.cz>
Thu, 17 Aug 2017 20:00:04 +0000 (22:00 +0200)
commit76386449a7111367268cd33241ca6423c5965193
treee11553b59233f1e4b836061ec2a39a3610cb1d61
parentc1217f0e39475f349d7e5d343fd8f5ecb0b7f5c3
quota: Fix possible corruption of dqi_flags

dqi_flags modifications are protected by dq_data_lock. However the
modifications in vfs_load_quota_inode() and in mark_info_dirty() were
not which could lead to corruption of dqi_flags. Since modifications to
dqi_flags are rare, this is hard to observe in practice but in theory it
could happen. Fix the problem by always using dq_data_lock for
protection.

Signed-off-by: Jan Kara <jack@suse.cz>
fs/quota/dquot.c
fs/quota/quota_v1.c