Skip to content

Commit ee8ac4d

Browse files
dhowellsAl Viro
authored andcommitted
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>
1 parent aa4d861 commit ee8ac4d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎net/unix/af_unix.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,7 @@ static int unix_mknod(const char *sun_path, umode_t mode, struct path *res)
839839
*/
840840
err = security_path_mknod(&path, dentry, mode, 0);
841841
if (!err) {
842-
err = vfs_mknod(path.dentry->d_inode, dentry, mode, 0);
842+
err = vfs_mknod(d_inode(path.dentry), dentry, mode, 0);
843843
if (!err) {
844844
res->mnt = mntget(path.mnt);
845845
res->dentry = dget(dentry);

0 commit comments

Comments
 (0)