Re: [PATCH -mm 2/6] rmap: always add new vmas at the end

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 21 Jun 2010 16:33:49 -0400
Rik van Riel <riel@xxxxxxxxxx> wrote:

> From: Andrea Arcangeli <aarcange@xxxxxxxxxx>
> Subject: always add new vmas at the end
> 
> Make sure to always add new VMAs at the end of the list.  This
> is important so rmap_walk does not miss a VMA that was created
> during the rmap_walk.
> 
> The old code got this right most of the time due to luck, but
> was buggy when anon_vma_prepare reused a mergeable anon_vma.
> 
> Signed-off-by: Andrea Arcangeli <aarcange@xxxxxxxxxx>
> Signed-off-by: Rik van Riel <riel@xxxxxxxxxx>
> ---
> 
> diff --git a/mm/rmap.c b/mm/rmap.c
> --- a/mm/rmap.c
> +++ b/mm/rmap.c
> @@ -149,7 +149,7 @@ int anon_vma_prepare(struct vm_area_stru
>  			avc->anon_vma = anon_vma;
>  			avc->vma = vma;
>  			list_add(&avc->same_vma, &vma->anon_vma_chain);
> -			list_add(&avc->same_anon_vma, &anon_vma->head);
> +			list_add_tail(&avc->same_anon_vma, &anon_vma->head);
>  			allocated = NULL;
>  			avc = NULL;
>  		}

Should this go into 2.6.35?

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]