2007-10-12 16:02:00

by Jan Blunck

[permalink] [raw]
Subject: [patch 1/2] r/o bind mounts: Dont touch the vfsmount after path_put()

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

Signed-off-by: Jan Blunck <[email protected]>
---
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) {

--


2007-10-12 16:13:43

by Dave Hansen

[permalink] [raw]
Subject: Re: [patch 1/2] r/o bind mounts: Dont touch the vfsmount after path_put()

On Fri, 2007-10-12 at 17:50 +0200, Jan Blunck wrote:
> plain text document attachment (vfs)
> mnt_drop_write() is called after releasing the reference to the path with
> path_put().
>
> Signed-off-by: Jan Blunck <[email protected]>

Ugh. Yeah. Thanks for finding that.

Acked-by: Dave Hansen <[email protected]>

-- Dave