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:27:22 +0000 (08:27 +0200)
commitd3a01f07b76e0cdcdef9d6f56c93e4ed2e83a090
tree04e7cd7960f9cdde53c7d277af3fa8ed9ea05a2c
parente11aaff1c38e8511682a6203df36c53bde43ce5e
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