Re: [PATCH] mm/fremap.c: fix another oops on error path

2013-03-17 Thread Ming Lei
On Sun, Mar 17, 2013 at 12:44 PM, Michel Lespinasse wrote: > On Sat, Mar 16, 2013 at 8:23 AM, Ming Lei wrote: >> Since find_vma() may return NULL, so don't dereference the >> returned 'vma' until it is valid. > > Agree this was an issue. This is fixed with commit a2362d24764a. It is fine if the

Re: [PATCH] mm/fremap.c: fix another oops on error path

2013-03-16 Thread Michel Lespinasse
On Sat, Mar 16, 2013 at 8:23 AM, Ming Lei wrote: > Since find_vma() may return NULL, so don't dereference the > returned 'vma' until it is valid. Agree this was an issue. This is fixed with commit a2362d24764a. -- Michel "Walken" Lespinasse A program is never fully debugged until the last user

[PATCH] mm/fremap.c: fix another oops on error path

2013-03-16 Thread Ming Lei
Since find_vma() may return NULL, so don't dereference the returned 'vma' until it is valid. The problem is introduced by the commit in linus tree: 6d7825b(mm/fremap.c: fix oops on error path). Also mark vm_flags as ninitialized_var() to avoid compile warning. Cc: Tommi Rantala Cc: Michel Les