Skip to content
Commit 5f16f322 authored by Theodore Ts'o's avatar Theodore Ts'o
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
parent ed3654eb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment