ext4: don't allow any modifications to an immutable file
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 10 Jun 2019 01:41:41 +0000 (21:41 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 28 Jul 2019 06:29:28 +0000 (08:29 +0200)
commit29171e82348cb0ce787120d42f0b94e8fba2bcae
treed6ded874ca5f70983e01ac0e94dc28fb9999966e
parent4a5cc64d8a8a0f937e6d857faf571966c903341d
ext4: don't allow any modifications to an immutable file

commit 2e53840362771c73eb0a5ff71611507e64e8eecd upstream.

Don't allow any modifications to a file that's marked immutable, which
means that we have to flush all the writable pages to make the readonly
and we have to check the setattr/setflags parameters more closely.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/ioctl.c