Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remap_file_pages: correctly handle the case of a NULL vm_ops pointer
In commit 0b173bc ("mm: kill vma flag VM_CAN_NONLINEAR") we replaced the VM_CAN_NONLINEAR test with checking whether the mapping has a '->remap_pages()' vm operation, but there is no guarantee that there it even has a vm_ops pointer at all. Add the appropriate test for NULL vm_ops. Reported-by: Sasha Levin <[email protected]> Cc: Konstantin Khlebnikov <[email protected]> Cc: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information