linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Locking issue on try_to_swap_out()
@ 2001-01-14 13:57 Marcelo Tosatti
  2001-01-17  7:13 ` Rik van Riel
  0 siblings, 1 reply; 2+ messages in thread
From: Marcelo Tosatti @ 2001-01-14 13:57 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-mm

Hi Linus,

In theory, there is nothing which guarantees that nobody will mess with
the page between "UnlockPage" and "deactivate_page" (that is pretty hard
to happen, I suppose, but anyway)

--- mm/vmscan.c.orig       Sun Jan 14 13:23:55 2001
+++ mm/vmscan.c    Sun Jan 14 13:24:16 2001
@@ -72,10 +72,10 @@
                swap_duplicate(entry);
                set_pte(page_table, swp_entry_to_pte(entry));
 drop_pte:
-               UnlockPage(page);
                mm->rss--;
                if (!page->age)
                        deactivate_page(page);
+               UnlockPage(page);
                page_cache_release(page);
                return;
        }


--
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] 2+ messages in thread

end of thread, other threads:[~2001-01-17  7:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-01-14 13:57 Locking issue on try_to_swap_out() Marcelo Tosatti
2001-01-17  7:13 ` Rik van Riel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox