[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-kernel
Subject: Re: [Patch] shm bug introduced with pagecache in 2.3.11
From: Linus Torvalds <torvalds () transmeta ! com>
Date: 1999-11-25 17:57:10
[Download RAW message or body]
On Thu, 25 Nov 1999, Andrea Arcangeli wrote:
>
> But I am not been trivially succesfully in fixing the shm swapin races
> with "read pte with spinlock acquired, release the spinlock, reacquire the
> spinlock and the check if the pte is changed". That's why I added the
> spinlock.
I was planning on just depending on the sanity of the page cache on this
one. Basically we have two cases:
- paging in something new ("no_page"), for which the final test is just
to test that the page table is still zero (ie we don't even need to
save any "original" value).
- paging in something old ("swap_page"), in wich case the final test is
to check that the pte is still the same as swp_entry_to_pte(entry).
(we have the rw_page case too, but that is already protected by the
spinlock appropriately as far as I can tell, exactly because it already
has the same race wrt page_out rather than page_in).
No, I haven't checked the exact details. Maybe it's worse than I envision,
but it _looks_ like adding a simple spinlock and the test. If the test
fails, we just return and expect the fault to happen again..
Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic