Andrew Morton 6d7825b10d 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 <tt.rantala@gmail.com>
Cc: Michel Lespinasse <walken@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-03-13 15:21:47 -07:00
..
2012-01-03 22:54:56 -05:00
2013-03-13 15:21:47 -07:00
2011-07-26 16:49:47 -07:00
2013-02-23 17:50:18 -08:00
2010-05-21 18:31:21 -04:00
2013-02-28 13:21:44 -08:00
2012-06-20 14:39:36 -07:00
2013-03-01 23:50:45 -05:00
2012-12-18 15:02:14 -08:00
2012-12-18 15:02:14 -08:00
2013-02-23 17:50:18 -08:00
2012-12-20 18:46:29 -05:00
2013-02-23 17:50:21 -08:00