]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ext4: fix potential deadlock with setuid files and EXT4_IOC_MOVE_EXT
authorTheodore Ts'o <tytso@mit.edu>
Tue, 20 Dec 2011 22:06:08 +0000 (17:06 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 20 Dec 2011 22:06:08 +0000 (17:06 -0500)
commit5e8af306ef8025a4c98bcc51b6b2ed63e1df31c4
tree04b3d94548380637ed4b91aaf3481240abe8f041
parent8c48f7e88e293b9dd422bd8884842aea85d30b22
ext4: fix potential deadlock with setuid files and EXT4_IOC_MOVE_EXT

file_remove_suid() must be called with i_mutex down, since it calls
notify_change().  In addition, we really want to remove the suid file
*before* we modify the donor file, to avoid someone from trying to
exploit a race.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: stable@vger.kernel.org
fs/ext4/ioctl.c
fs/ext4/move_extent.c