Re: [PATCH] page->flags corruption fix

From: David S. Miller
Date: Wed Oct 08 2003 - 10:00:56 EST


On Wed, 8 Oct 2003 15:49:34 +0100 (BST)
Hugh Dickins <hugh@xxxxxxxxxxx> wrote:

> Seven atomic ops in a row, isn't that rather inefficient?
> The 2.6 version clears those PG_flags all together in one
> non-atomic op - but elsewhere, in prep_new_page.
>
> Is there an actual test case for why 2.4 now needs this change?

It's not a new bug, we've always had this bug in 2.4.x

There is so much code that does atomic bit ops asynchronously on
page->flags that it is therefore not safe for any context to make
non-atomic changes to the values there.

The patch Rik posted is the safest solution to this bug. If you
want to make it faster by creating a "mutliple bit" set of bitops
go right ahead, but be nice enough to make sure every single architecture
has an implementation before suggesting that the change gets merged
into 2.4.x
-
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/