Re: [PATCH] rmap: validate pointer in anon_vma_clone

2014-05-06 Thread Jianyu Zhan
On Wed, May 7, 2014 at 10:32 AM, Leon Ma wrote: > If memory allocation failed in first loop, root will be NULL and > will lead to kernel panic. Hello, Leon, I am afraid not. unlock_anon_vma_root() has a sanity check NULLness of root, so it is impossible to panic for a dangling root pointer.

RE: [PATCH] rmap: validate pointer in anon_vma_clone

2014-05-06 Thread Ma, Xindong
l.com; linux...@kvack.org; linux-kernel@vger.kernel.org Cc: Ma, Xindong Subject: [PATCH] rmap: validate pointer in anon_vma_clone If memory allocation failed in first loop, root will be NULL and will lead to kernel panic. Signed-off-by: Leon Ma --- mm/rmap.c |6 -- 1 file chang

[PATCH] rmap: validate pointer in anon_vma_clone

2014-05-06 Thread Leon Ma
If memory allocation failed in first loop, root will be NULL and will lead to kernel panic. Signed-off-by: Leon Ma --- mm/rmap.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mm/rmap.c b/mm/rmap.c index 9c3e773..6e53aed 100644 --- a/mm/rmap.c +++ b/mm/rmap.c @@ -24