Skip to content
Commit f69e749a authored by Alexander Lochmann's avatar Alexander Lochmann Committed by Al Viro
Browse files

Abort file_remove_privs() for non-reg. files



file_remove_privs() might be called for non-regular files, e.g.
blkdev inode. There is no reason to do its job on things
like blkdev inodes, pipes, or cdevs. Hence, abort if
file does not refer to a regular inode.

AV: more to the point, for devices there might be any number of
inodes refering to given device.  Which one to strip the permissions
from, even if that made any sense in the first place?  All of them
will be observed with contents modified, after all.

Found by LockDoc (Alexander Lochmann, Horst Schirmeier and Olaf
Spinczyk)

Reviewed-by: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatarAlexander Lochmann <alexander.lochmann@tu-dortmund.de>
Signed-off-by: default avatarHorst Schirmeier <horst.schirmeier@tu-dortmund.de>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent ee948837
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