From ee8ac4d61c2cf43bdd427e70db97ac330e61570d Mon Sep 17 00:00:00 2001 From: David Howells Date: Fri, 6 Mar 2015 14:05:26 +0000 Subject: VFS: AF_UNIX sockets should call mknod on the top layer only AF_UNIX sockets should call mknod on the top layer only and should not attempt to modify the lower layer in a layered filesystem such as overlayfs. Signed-off-by: David Howells Signed-off-by: Al Viro --- net/unix/af_unix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net') diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 433f287ee548..8b8f5e6d20bc 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -839,7 +839,7 @@ static int unix_mknod(const char *sun_path, umode_t mode, struct path *res) */ err = security_path_mknod(&path, dentry, mode, 0); if (!err) { - err = vfs_mknod(path.dentry->d_inode, dentry, mode, 0); + err = vfs_mknod(d_inode(path.dentry), dentry, mode, 0); if (!err) { res->mnt = mntget(path.mnt); res->dentry = dget(dentry); -- cgit v1.2.3-59-g8ed1b