Skip to content
Commit 00a1a053 authored by Theodore Ts'o's avatar Theodore Ts'o Committed by Linus Torvalds
Browse files

ext4: atomically set inode->i_flags in ext4_set_inode_flags()



Use cmpxchg() to atomically set i_flags instead of clearing out the
S_IMMUTABLE, S_APPEND, etc. flags and then setting them from the
EXT4_IMMUTABLE_FL, EXT4_APPEND_FL flags, since this opens up a race
where an immutable file has the immutable flag cleared for a brief
window of time.

Reported-by: default avatarJohn Sullivan <jsrhbz@kanargh.force9.co.uk>
Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
Cc: stable@kernel.org
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 981e893e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment