From: Steve Dickson <SteveD@redhat.com>
To: nfsv4@linux-nfs.org
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH] NFSv4: rpc_mkpipe creating socket inodes w/out sk buffers.
Date: Wed, 06 Sep 2006 11:51:21 -0400 [thread overview]
Message-ID: <44FEEE79.30201@RedHat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 466 bytes --]
rpc_mkpipe sets the S_IFSOCK mode bit when it creates a
inode but does not create a true socket inode. So when other parts
of the kernel (i.e. the SELinux code in the-mm kernel) use
S_ISSOCK() to see if the inode is a socket, the macro returns true,
but the expected socket inode container structure is really
an rpc_inode container which obviously causes problems...
This patch simply change the S_IFSOCK mode bit to
S_IFIFO which eliminates the problem.
steved.
[-- Attachment #2: nfs-2.6-rpc-mkpipe.patch --]
[-- Type: text/x-patch, Size: 858 bytes --]
This patch stop rpc_mkpipe from create S_IFSOCK nodes what don't
have associated sk buffers attached (which causes SELinux to oops
during NFSv4 mounts). Instead the S_IFIFO mode bit is set which
probably make more sense and seems to work just fine during
my connectathon and fsx testing...
Signed-off-by: Steve Dickson <steved@redhat.com>
--------------------------------------
--- nfs-2.6/net/sunrpc/rpc_pipe.c.orig 2006-08-24 14:33:43.000000000 -0400
+++ nfs-2.6/net/sunrpc/rpc_pipe.c 2006-09-06 10:31:45.000000000 -0400
@@ -720,7 +720,7 @@ rpc_mkpipe(struct dentry *parent, const
if (IS_ERR(dentry))
return dentry;
dir = parent->d_inode;
- inode = rpc_get_inode(dir->i_sb, S_IFSOCK | S_IRUSR | S_IWUSR);
+ inode = rpc_get_inode(dir->i_sb, S_IFIFO | S_IRUSR | S_IWUSR);
if (!inode)
goto err_dput;
inode->i_ino = iunique(dir->i_sb, 100);
reply other threads:[~2006-09-06 15:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=44FEEE79.30201@RedHat.com \
--to=steved@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nfsv4@linux-nfs.org \
/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