From: Ben LaHaise <bcrl@redhat.com>
To: linux-mm@kvack.org
Subject: [PATCH] another thinko in memory.c (fwd)
Date: Thu, 5 Apr 2001 18:08:56 -0400 (EDT) [thread overview]
Message-ID: <Pine.LNX.4.33.0104051808390.2151-100000@today.toronto.redhat.com> (raw)
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/
reply other threads:[~2001-04-05 22:08 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.33.0104051808390.2151-100000@today.toronto.redhat.com \
--to=bcrl@redhat.com \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox