summaryrefslogtreecommitdiffstats
path: root/net/unix
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2015-03-06 14:05:26 +0000
committerAl Viro <viro@zeniv.linux.org.uk>2015-04-15 15:06:54 -0400
commitee8ac4d61c2cf43bdd427e70db97ac330e61570d (patch)
tree4e69d2aa92716b70c5aa9737b48945e8610a2099 /net/unix
parentaa4d86163e4e91a1ac560954a554bab417e338f4 (diff)
downloadop-kernel-dev-ee8ac4d61c2cf43bdd427e70db97ac330e61570d.zip
op-kernel-dev-ee8ac4d61c2cf43bdd427e70db97ac330e61570d.tar.gz
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 <dhowells@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'net/unix')
-rw-r--r--net/unix/af_unix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index 433f287..8b8f5e6 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);
OpenPOWER on IntegriCloud