Re: page allocator regression on nommu

From: David Howells
Date: Tue Sep 01 2009 - 09:36:45 EST

Pekka Enberg <penberg@xxxxxxxxxxxxxx> wrote:

> This looks to be a bug in nommu do_mmap_pgoff() error handling. I
> guess we shouldn't call __put_nommu_region() if add_nommu_region()
> hasn't been called?

We should to make sure the region gets cleaned up properly. However, it will
go wrong if do_mmap_shared_file() or do_mmap_private() fail. We should
perhaps call add_nommu_region() before doing the "set up the mapping" chunk -
we hold the region semaphore, so it shouldn't hurt anyone if we then have to
remove it again.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at