Re: [patch] mm: tiny-shmem fix lor, mmap_sem vs i_mutex

From: Matt Mackall
Date: Wed Sep 17 2008 - 16:50:16 EST



On Wed, 2008-09-17 at 13:14 -0700, Andrew Morton wrote:
> On Mon, 15 Sep 2008 00:12:31 +0200
> Nick Piggin <npiggin@xxxxxxx> wrote:
>
> > tiny-shmem calls do_truncate in shmem_file_setup. do_truncate takes i_mutex,
> > and shmem_file_setup is called with mmap_sem held. However i_mutex nests
> > outside mmap_sem.
> >
> > Copy the code in shmem.c to avoid this problem.
> >
>
> It's a bit unfortunate (as in: arse-about) that we end up creating new
> files deep within the mmap code, but I guess we won't be changing that
> in a hurry.

Hugh and I talked about merging it back into one file ala the x86 32/64
merge. I've put it on my todo list.

--
Mathematics is the supreme nostalgia of our time.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/