SMP VM race in 2.[0-4]

From: Mikulas Patocka (mikulas@artax.karlin.mff.cuni.cz)
Date: Wed Oct 04 2000 - 09:04:47 EST


Hi.

I found a possible problem on SMP. In vmscan.c / try_to_swap_out you do
not use atomic operations for manipulating with ptes. You read the pte,
modify it and write it nonatomically. When the second CPU is running
process that turns on 'D' bit of pte while the first CPU is in
try_to_swap_out, 'D' bit is lost. Because anonymous pages have always 'D'
bit set, the bug can only affect pages mapped with MAP_SHAREAD,
PROT_WRITE. Sometimes updates are not written back to file.

Mikulas

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



This archive was generated by hypermail 2b29 : Sat Oct 07 2000 - 21:00:14 EST