A data race on mnt->mnt.mnt_flags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

We found a data race that could happen between clone_mnt() and
mnt_hold_writers() over mnt->mnt.mnt_flags.

The two functions can write to mnt->mnt.mnt_flags concurrently.
Although mnt_hold_writers() holds the lock_mount_hash(), clone_mnt() does not
respect this lock at this moment (it will apply for this lock later).

Thread-1					Thread-2
// clone_mnt()				// mnt_hold_writers() holding lock_mount_hash()
mnt->mnt.mnt_flags &= ~(MNT_WRITE_HOLD|MNT_MARKED|MNT_INTERNAL);
						mnt->mnt.mnt_flags |= MNT_WRITE_HOLD;

It is not clear whether this is a serious problem but we would like to report it
just in case.

Thanks,
Sishuai



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux