diff options
author | David Howells <dhowells@redhat.com> | 2015-03-06 17:05:26 +0300 |
---|---|---|
committer | Sasha Levin <sasha.levin@oracle.com> | 2016-07-11 17:20:19 +0300 |
commit | 5d93db4b2edf6d35870ce46a6ac579a46e140d81 (patch) | |
tree | e5c480dc3d0e4998a059e094c1a7a8af3fea4719 /net/unix | |
parent | b65b0f675afb1cb5d3daff91e3bb7722f9d7ec9c (diff) | |
download | linux-5d93db4b2edf6d35870ce46a6ac579a46e140d81.tar.xz |
VFS: AF_UNIX sockets should call mknod on the top layer only
[ Upstream commit ee8ac4d61c2cf43bdd427e70db97ac330e61570d ]
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 <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Diffstat (limited to 'net/unix')
-rw-r--r-- | net/unix/af_unix.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index bba93a6575f8..7950b4c26651 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -959,7 +959,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); |