NFSv4: rpc_mkpipe creating socket inodes w/out sk buffers.
Subsystems (3)
PATCH 1/1 NFSv4: rpc_mkpipe creating socket inodes w/out sk buffers.
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 toS_IFIFO which eliminates the problem.
steved.
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...
--------------------------------------
net/sunrpc/rpc_pipe.c renamed from net/sunrpc/rpc_pipe.c.orig +1 -1
@@ -720,7 +720,7 @@ rpc_mkpipe(struct dentry *parent, constif (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 );