]> Git Repo - linux.git/commit
mm/fremap.c: fix oops on error path
authorAndrew Morton <[email protected]>
Wed, 13 Mar 2013 21:59:43 +0000 (14:59 -0700)
committerLinus Torvalds <[email protected]>
Wed, 13 Mar 2013 22:21:47 +0000 (15:21 -0700)
commit6d7825b10dbeafd60627cd04291fb10ec2b5b973
tree665fe65bbb0f931dc5d89596c0c12d2569638ea3
parentc8615d3716fe327c2540cf514a34b227dc9b39e8
mm/fremap.c: fix oops on error path

If find_vma() fails, sys_remap_file_pages() will dereference `vma', which
contains NULL.  Fix it by checking the pointer.

(We could alternatively check for err==0, but this seems more direct)

(The vm_flags change is to squish a bogus used-uninitialised warning
without adding extra code).

Reported-by: Tommi Rantala <[email protected]>
Cc: Michel Lespinasse <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/fremap.c
This page took 0.054838 seconds and 4 git commands to generate.