]> git.baikalelectronics.ru Git - kernel.git/commit
ovl: fix xattr get and set with selinux
authorMiklos Szeredi <mszeredi@redhat.com>
Thu, 20 Jul 2017 09:08:21 +0000 (11:08 +0200)
committerMiklos Szeredi <mszeredi@redhat.com>
Thu, 20 Jul 2017 09:08:21 +0000 (11:08 +0200)
commitca650976a681a2cdc06fcabbd48f4d3da1513c96
treedec3cc4ead42891e7f52418ddb939a2d4c359d71
parentf83aa5e7ff47bd2d9e39b77bc692b681680aebf4
ovl: fix xattr get and set with selinux

inode_doinit_with_dentry() in SELinux wants to read the upper inode's xattr
to get security label, and ovl_xattr_get() calls ovl_dentry_real(), which
depends on dentry->d_inode, but d_inode is null and not initialized yet at
this point resulting in an Oops.

Fix by getting the upperdentry info from the inode directly in this case.

Reported-by: Eryu Guan <eguan@redhat.com>
Fixes: 31c00e129b37 ("ovl: move __upperdentry to ovl_inode")
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/overlayfs/inode.c
fs/overlayfs/overlayfs.h
fs/overlayfs/super.c
fs/overlayfs/util.c