Re: [PATCH] rmap 15c

From: Rik van Riel (riel@conectiva.com.br)
Date: Fri Jan 31 2003 - 09:45:11 EST


On Thu, 30 Jan 2003, Marc-Christian Petersen wrote:
> On Thursday 30 January 2003 14:32, Rik van Riel wrote:
>
> Hi Rik,
>
> > rmap 15c:
> > - backport and audit akpm's reliable pte_chain alloc
> > code from 2.5 (me)
> > - reintroduce cache size tuning knobs in /proc (me)
> > | on very, very popular request
>
> GREAT to see this. Already merged for wolk4.0s-pre10 :)

Better merge this little patch, too. Arjan spotted this
bug and now I'm not sure why rmap15c worked at all, let
alone why it survived a night of stress testing ... ;)

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
# ChangeSet 1.793 -> 1.794
# fs/exec.c 1.24 -> 1.25
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/01/31 riel@imladris.surriel.com 1.794
# uh oh, here we could end up freeing a used pte_chain
# (thanks arjan)
# --------------------------------------------
#
diff -Nru a/fs/exec.c b/fs/exec.c
--- a/fs/exec.c Fri Jan 31 12:44:30 2003
+++ b/fs/exec.c Fri Jan 31 12:44:30 2003
@@ -308,7 +308,7 @@
         flush_dcache_page(page);
         flush_page_to_ram(page);
         set_pte(pte, pte_mkdirty(pte_mkwrite(mk_pte(page, PAGE_COPY))));
- page_add_rmap(page, pte, pte_chain);
+ pte_chain = page_add_rmap(page, pte, pte_chain);
         tsk->mm->rss++;
         pte_unmap(pte);
         spin_unlock(&tsk->mm->page_table_lock);

Rik

-- 
Bravely reimplemented by the knights who say "NIH".
http://www.surriel.com/		http://guru.conectiva.com/
Current spamtrap:  <a href=mailto:"october@surriel.com">october@surriel.com</a>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Jan 31 2003 - 22:00:25 EST