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>
This commit is contained in:
parent
aa4d86163e
commit
ee8ac4d61c
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
err = security_path_mknod(&path, dentry, mode, 0);
|
||||||
if (!err) {
|
if (!err) {
|
||||||
err = vfs_mknod(path.dentry->d_inode, dentry, mode, 0);
|
err = vfs_mknod(d_inode(path.dentry), dentry, mode, 0);
|
||||||
if (!err) {
|
if (!err) {
|
||||||
res->mnt = mntget(path.mnt);
|
res->mnt = mntget(path.mnt);
|
||||||
res->dentry = dget(dentry);
|
res->dentry = dget(dentry);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue