lkml.org 
[lkml]   [2009]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: page allocator regression on nommu
From
Date
On Tue, 2009-09-01 at 14:46 +0100, David Howells wrote:
> From: David Howells <dhowells@redhat.com>
> Subject: [PATCH] NOMMU: Fix error handling in do_mmap_pgoff()
>
> Fix the error handling in do_mmap_pgoff(). If do_mmap_shared_file() or
> do_mmap_private() fail, we jump to the error_put_region label at which point we
> cann __put_nommu_region() on the region - but we haven't yet added the region
> to the tree, and so __put_nommu_region() may BUG because the region tree is
> empty or it may corrupt the region tree.
>
> To get around this, we can afford to add the region to the region tree before
> calling do_mmap_shared_file() or do_mmap_private() as we keep nommu_region_sem
> write-locked, so no-one can race with us by seeing a transient region.
>
> Signed-off-by: David Howells <dhowells@redhat.com>

Looks sane to me. FWIW:

Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>

Pekka



\
 
 \ /
  Last update: 2009-09-01 15:51    [W:0.052 / U:4.948 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site