Messages in this thread | | | Date | Tue, 25 Aug 2009 20:10:19 +0200 | From | Andrea Arcangeli <> | Subject | Re: [PATCH 13/12] ksm: fix munlock during exit_mmap deadlock |
| |
On Tue, Aug 25, 2009 at 06:49:09PM +0100, Hugh Dickins wrote: > Sorry, I just don't get it. How does down_read here help? > Perhaps you thought ksm.c had down_write of mmap_sem in all cases? > > No, and I don't think we want to change its down_reads to down_writes.
Looking ksm.c it should have been down_write indeed...
> Nor do we want to change your down_read here to down_write, that will > just reintroduce the OOM deadlock that 9/12 was about solving.
I'm not sure anymore I get what this fix is about... mm_users is allowed to go to 0. If mm_users is allowed to go to 0, it's up to ksm to check inside its inner loops that mm_users is 0 and bail out. Bailing out it will unblock exit so that exit_mmap can run. What exactly is the unfixable issue?
| |