From: Ben LaHaise <bcrl@touchme.toronto.redhat.com>
To: alan@redhat.com
Cc: linux-mm@kvack.org
Subject: [PATCH] clear_page_tables
Date: Thu, 23 Aug 2001 15:05:14 -0400 [thread overview]
Message-ID: <200108231905.f7NJ5E223517@touchme.toronto.redhat.com> (raw)
Heylo,
The patch below fixes a lack of locking in clear_page_tables which could
result in kswapd poking at page tables that have been freed.
-ben
/patches/v2.4.8-ac9-clear_page_tables-lock.diff...
diff -ur /md0/kernels/2.4/v2.4.8-ac9/mm/memory.c vm-v2.4.8-ac9/mm/memory.c
--- /md0/kernels/2.4/v2.4.8-ac9/mm/memory.c Thu Aug 23 13:48:25 2001
+++ vm-v2.4.8-ac9/mm/memory.c Thu Aug 23 14:45:46 2001
@@ -129,11 +129,13 @@
{
pgd_t * page_dir = mm->pgd;
+ spin_lock(&mm->page_table_lock);
page_dir += first;
do {
free_one_pgd(page_dir);
page_dir++;
} while (--nr);
+ spin_unlock(&mm->page_table_lock);
/* keep the page table cache within bounds */
check_pgt_cache();
--
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-mm.org/
reply other threads:[~2001-08-23 19:05 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=200108231905.f7NJ5E223517@touchme.toronto.redhat.com \
--to=bcrl@touchme.toronto.redhat.com \
--cc=alan@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