mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: viro@ftp.linux.org.uk
Cc: dhowells@redhat.com, linux-unionfs@vger.kernel.org,
	linux-kernel@vger.kernel.org, miklos@szeredi.hu
Subject: [PATCH 07/15] VFS: AF_UNIX sockets should call mknod on the top layer only
Date: Wed, 25 Mar 2015 14:44:37 +0000	[thread overview]
Message-ID: <20150325144437.17670.59599.stgit@warthog.procyon.org.uk> (raw)
In-Reply-To: <20150325144330.17670.6959.stgit@warthog.procyon.org.uk>

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>
---

 net/unix/af_unix.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index 526b6edab018..bd3a1cfd4b73 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -844,7 +844,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);


  parent reply	other threads:[~2015-03-25 14:47 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-25 14:43 [PATCH 00/15] VFS: File pinning: pre-script-run fixups David Howells
2015-03-25 14:43 ` [PATCH 01/15] configfs: Fix inconsistent use of file_inode() vs file->f_path.dentry->d_inode David Howells
2015-03-25 14:43 ` [PATCH 02/15] VFS: Fix up missed bits of apparmor to use d_inode() David Howells
2015-03-25 14:43 ` [PATCH 03/15] VFS: Fix up audit to use d_backing_inode() David Howells
2015-03-25 14:44 ` [PATCH 04/15] VFS: Fix up missed bits of lustre to use d_inode() David Howells
2015-03-25 14:44 ` [PATCH 05/15] VFS: Fix up missed bits of ecryptfs " David Howells
2015-03-25 14:44 ` [PATCH 06/15] VFS: Fix up missed bits of reiserfs " David Howells
2015-03-25 14:44 ` David Howells [this message]
2015-03-25 14:44 ` [PATCH 08/15] VFS: Cachefiles should perform fs modifications on the top layer only David Howells
2015-03-25 14:44 ` [PATCH 09/15] VFS: Fix up some ->d_inode accesses in the chelsio driver David Howells
2015-03-25 14:45 ` [PATCH 10/15] VFS: Fix up debugfs to use d_is_dir() in place of S_ISDIR() David Howells
2015-03-25 14:45 ` [PATCH 11/15] NFS: Don't use d_inode as a variable name David Howells
2015-03-25 14:45 ` [PATCH 12/15] VFS: Add owner-filesystem positive/negative dentry checks David Howells
2015-03-26 13:05   ` Miklos Szeredi
2015-03-27 14:42   ` David Howells
2015-03-27 15:27     ` Miklos Szeredi
2015-03-25 14:45 ` [PATCH 13/15] VFS: Impose ordering on accesses of d_inode and d_flags David Howells
2015-03-25 14:45 ` [PATCH 14/15] VFS: Combine inode checks with d_is_negative() and d_is_positive() in pathwalk David Howells
2015-03-25 14:45 ` [PATCH 15/15] VFS: Make pathwalk use d_is_reg() rather than S_ISREG() David Howells

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150325144437.17670.59599.stgit@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=viro@ftp.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®