diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2022-05-25 14:23:45 -0400 |
---|---|---|
committer | Matthew Wilcox (Oracle) <willy@infradead.org> | 2022-06-09 16:24:25 -0400 |
commit | dcfa24ba68991ab69a48254a18377b45180ae664 (patch) | |
tree | 1095030522aad702805d25d23b91fe13320fabb9 /include/linux/xarray.h | |
parent | 6bf74cddcffac0bc5ee0fad724aac778d2e53f75 (diff) |
filemap: Cache the value of vm_flags
After we have unlocked the mmap_lock for I/O, the file is pinned, but
the VMA is not. Checking this flag after that can be a use-after-free.
It's not a terribly interesting use-after-free as it can only read one
bit, and it's used to decide whether to read 2MB or 4MB. But it
upsets the automated tools and it's generally bad practice anyway,
so let's fix it.
Reported-by: syzbot+5b96d55e5b54924c77ad@syzkaller.appspotmail.com
Fixes: 4687fdbb805a ("mm/filemap: Support VM_HUGEPAGE for file mappings")
Cc: stable@vger.kernel.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Diffstat (limited to 'include/linux/xarray.h')
0 files changed, 0 insertions, 0 deletions