Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: [email protected] Fixes: 4687fdb ("mm/filemap: Support VM_HUGEPAGE for file mappings") Cc: [email protected] Signed-off-by: Matthew Wilcox (Oracle) <[email protected]>
- Loading branch information