]> exis.tech > repos - linux.git/commit
gfs2: page poisoning fix
authorAndreas Gruenbacher <agruenba@redhat.com>
Wed, 27 May 2026 19:15:04 +0000 (21:15 +0200)
committerAndreas Gruenbacher <agruenba@redhat.com>
Fri, 29 May 2026 09:11:40 +0000 (11:11 +0200)
commit4982e58669b11c43644efb5fb7435975848b716e
tree7c3e48a85cd3e6ba18dfd541d60b0e89ee55a337
parent70008e22ab3fd619fb2a50dcfa80b9dfa26c5d8a
gfs2: page poisoning fix

Processes can write to the last page of a file using mmap, and when the file
size is not a multiple of the page size, this can be used to write beyond the
end of the file.  This is sometimes referred to as page poisoning, and it is
not a problem in itself because the data beyond eof will be ignored.  However,
we currently fail to clear out any space beyond the end of the file that we
skip over when the file size is increased, so that "poison" can end up getting
exposed.  Fix that.

Fixes xfstest generic/363.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/bmap.c
fs/gfs2/bmap.h
fs/gfs2/file.c