linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] bugfix in memory.c
@ 2001-07-29 10:10 velizarb
  0 siblings, 0 replies; only message in thread
From: velizarb @ 2001-07-29 10:10 UTC (permalink / raw)
  To: Linux Kernel mailing list

The following is a bugfix against memory.c:lock_kiovec, 
At line 649 we have:
	if (!PageLocked(page)) {
which assumes page is the page we failed to lock, and if it is unlocked after calling
the unlock_kiovec we have a page which has been mapped twice, but page has been modified
and it doesn't contain the expected value.

Patch is against 2.4.8-pre1, Comments are welcome.

--

--- memory.c.old	Sun Jul 29 12:38:19 2001
+++ memory.c	Sun Jul 29 12:39:04 2001
@@ -619,9 +619,10 @@
 			
 			if (TryLockPage(page)) {
 				while (j--) {
-					page = *(--ppage);
-					if (page)
-						UnlockPage(page);
+					struct page *tmp;
+					tmp = *(--ppage);
+					if (tmp)
+						UnlockPage(tmp);
 				}
 				goto retry;
 			}

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-07-29 10:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-29 10:10 [PATCH] bugfix in memory.c velizarb

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).