From: Andrew Morton Date: Wed, 13 Mar 2013 21:59:43 +0000 (-0700) Subject: mm/fremap.c: fix oops on error path X-Git-Tag: v3.9-rc3~16^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d7825b10dbeafd60627cd04291fb10ec2b5b973;p=pandora-kernel.git 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 Cc: Michel Lespinasse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed