Re: [PATCH] Define a UNIQUE value for AS_UNEVICTABLE flag

From: Lee Schermerhorn
Date: Thu Apr 02 2009 - 14:09:02 EST


On Thu, 2009-04-02 at 09:53 -0700, Andrew Morton wrote:
> On Thu, 02 Apr 2009 12:47:15 -0400 Lee Schermerhorn <Lee.Schermerhorn@xxxxxx> wrote:
>
> > [PATCH] Define UNIQUE value of AS_UNEVICTABLE
> >
> > Needed in 2.6.28, 2.6.29, ...
> >
> > A new "address_space flag"--AS_MM_ALL_LOCKS--was defined to use the next
> > available AS flag while the Unevictable LRU was under development. The
> > Unevictable LRU was using the same flag and "no one" noticed. Current
> > mainline, since 2.6.28, has same value for two symbolic flag names.
>
> argh.
>
> What are the user-observable effects of the bug, and why didn't anyone
> notice it until now?


Well, AS_MM_ALL_LOCKS seems to be used for mmu notifiers. So, I expect
I've never enabled it. However, I think that if it got set, all of the
pages in all of the vmas that had it set will appear to be unevictable.
This would only matter if/when one tried to reclaim/evict them. The
pages would probably get stranded on the unevictable lru [until freed]
in that case as there would be no scan to rescue them when
AS_MM_ALL_LOCKS is cleared.

Not sure about the other way around: flag set as AS_UNEVICTABLE and
code examining AS_MM_ALL_LOCKS sees it...



--
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/