* [PATCH] another thinko in memory.c (fwd)
@ 2001-04-05 22:08 Ben LaHaise
0 siblings, 0 replies; only message in thread
From: Ben LaHaise @ 2001-04-05 22:08 UTC (permalink / raw)
To: linux-mm
Ooops, forgot to cc...
---------- Forwarded message ----------
Date: Thu, 5 Apr 2001 18:05:13 -0400 (EDT)
From: Ben LaHaise <bcrl@redhat.com>
To: torvalds@transmeta.com, alan@redhat.com
Cc: arjanv@redhat.com
Subject: [PATCH] another thinko in memory.c
Hey folks,
Ingo spotted this one, and it's the same kind of smp race.
-ben
diff -ur v2.4.3/mm/memory.c work-2.4.3/mm/memory.c
--- v2.4.3/mm/memory.c Thu Apr 5 11:53:46 2001
+++ work-2.4.3/mm/memory.c Thu Apr 5 16:27:08 2001
@@ -859,9 +859,12 @@
* the swap cache, grab a reference and start using it.
* Can not do lock_page, holding page_table_lock.
*/
- if (!PageSwapCache(old_page) || TryLockPage(old_page))
+ if (!PageSwapCache(old_page))
break;
- if (is_page_shared(old_page)) {
+ if (TryLockPage(old_page))
+ break;
+ /* Recheck swapcachedness: this is a triggerable smp race. */
+ if (!PageSwapCache(old_page) || is_page_shared(old_page)) {
UnlockPage(old_page);
break;
}
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-04-05 22:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-05 22:08 [PATCH] another thinko in memory.c (fwd) Ben LaHaise
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox