All of lore.kernel.org
 help / color / mirror / Atom feed
* [alternative-merged] fs-nameic-fix-filp_cachep-memory-corruption.patch removed from -mm tree
@ 2011-02-14 20:18 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2011-02-14 20:18 UTC (permalink / raw)
  To: hooanon05, npiggin, viro, mm-commits


The patch titled
     fs/namei.c: fix filp_cachep memory corruption
has been removed from the -mm tree.  Its filename was
     fs-nameic-fix-filp_cachep-memory-corruption.patch

This patch was dropped because an alternative patch was merged

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: fs/namei.c: fix filp_cachep memory corruption
From: J. R. Okajima <hooanon05@yahoo.co.jp>

In 31e6b01 ("fs: rcu-walk for path lookup") the condition "-ESTALE &&
!LOOKUP_REVAL" is added to "goto reval" in do_filp_open(), and it looks up
again with LOOKUP_REVAL _after_ release_open_intent().  Since
release_open_intent() is called by do_last() and finish_open() too, add
the same condition to all of them.

Signed-off-by: J. R. Okajima <hooanon05@yahoo.co.jp>
Cc: Nick Piggin <npiggin@kernel.dk>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 fs/namei.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff -puN fs/namei.c~fs-nameic-fix-filp_cachep-memory-corruption fs/namei.c
--- a/fs/namei.c~fs-nameic-fix-filp_cachep-memory-corruption
+++ a/fs/namei.c
@@ -2265,7 +2265,8 @@ static struct file *finish_open(struct n
 	return filp;
 
 exit:
-	if (!IS_ERR(nd->intent.open.file))
+	if (!(error == -ESTALE && !(nd->flags & LOOKUP_REVAL))
+	    && !IS_ERR(nd->intent.open.file))
 		release_open_intent(nd);
 	path_put(&nd->path);
 	return ERR_PTR(error);
@@ -2389,7 +2390,8 @@ exit_mutex_unlock:
 exit_dput:
 	path_put_conditional(path, nd);
 exit:
-	if (!IS_ERR(nd->intent.open.file))
+	if (!(error == -ESTALE && !(nd->flags & LOOKUP_REVAL))
+	    && !IS_ERR(nd->intent.open.file))
 		release_open_intent(nd);
 	path_put(&nd->path);
 	return ERR_PTR(error);
@@ -2560,7 +2562,8 @@ exit_dput:
 out_path:
 	path_put(&nd.path);
 out_filp:
-	if (!IS_ERR(nd.intent.open.file))
+	if (!(error == -ESTALE && !(flags & LOOKUP_REVAL))
+	    && !IS_ERR(nd.intent.open.file))
 		release_open_intent(&nd);
 	filp = ERR_PTR(error);
 	goto out;
_

Patches currently in -mm which might be from hooanon05@yahoo.co.jp are

origin.patch


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

only message in thread, other threads:[~2011-02-14 20:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-14 20:18 [alternative-merged] fs-nameic-fix-filp_cachep-memory-corruption.patch removed from -mm tree akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.