]> git.baikalelectronics.ru Git - kernel.git/commit
remap_file_pages: correctly handle the case of a NULL vm_ops pointer
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 19 Oct 2012 20:37:57 +0000 (13:37 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 19 Oct 2012 20:37:57 +0000 (13:37 -0700)
commit1b82ab3fb86749869533e2314a2ce2e0f529be40
tree36423a9de6427ada2eb3393f1d67036902c947a1
parentf3ae5513ae2a535a6fb4022ac81ce1aa8cdd72ac
remap_file_pages: correctly handle the case of a NULL vm_ops pointer

In commit de5a95b614e2 ("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 <levinsasha928@gmail.com>
Cc: Konstantin Khlebnikov <khlebnikov@openvz.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/fremap.c