public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jan Blunck <jblunck@suse.de>
To: Dave Hansen <haveblue@us.ibm.com>
Cc: Linux-Kernel Mailinglist <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@osdl.org>
Subject: [patch 1/2] r/o bind mounts: Dont touch the vfsmount after path_put()
Date: Fri, 12 Oct 2007 17:50:20 +0200	[thread overview]
Message-ID: <20071012155019.985151100@hasse.suse.de> (raw)
In-Reply-To: 20071012155019.747515889@hasse.suse.de

[-- Attachment #1: vfs/r-o-af_unix-bind-mnt_drop_write-fix.diff --]
[-- Type: text/plain, Size: 630 bytes --]

mnt_drop_write() is called after releasing the reference to the path with
path_put().

Signed-off-by: Jan Blunck <jblunck@suse.de>
---
 net/unix/af_unix.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: b/net/unix/af_unix.c
===================================================================
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -752,8 +752,8 @@ static struct sock *unix_find_other(stru
 		if (u->sk_type == type)
 			touch_atime(nd.path.mnt, nd.path.dentry);
 
-		path_put(&nd.path);
 		mnt_drop_write(nd.path.mnt);
+		path_put(&nd.path);
 
 		err=-EPROTOTYPE;
 		if (u->sk_type != type) {

-- 


  reply	other threads:[~2007-10-12 16:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-12 15:50 [patch 0/2] r/o bind mount fixes for 2.6.23-mm1 Jan Blunck
2007-10-12 15:50 ` Jan Blunck [this message]
2007-10-12 16:06   ` [patch 1/2] r/o bind mounts: Dont touch the vfsmount after path_put() Dave Hansen
2007-10-12 15:50 ` [patch 2/2] r/o bind mounts: Accept passing a mnt NULL pointer to mnt_drop_write() Jan Blunck
2007-10-12 16:10   ` Dave Hansen
2007-10-13 11:25   ` Christoph Hellwig

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=20071012155019.985151100@hasse.suse.de \
    --to=jblunck@suse.de \
    --cc=akpm@osdl.org \
    --cc=haveblue@us.ibm.com \
    --cc=linux-kernel@vger.kernel.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