[PATCH -next -v4 02/17] LSM: pass struct path to the inode_setsecctx hook
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Tue Nov 17 14:43:57 UTC 2026
> The inode_setsecctx hook and its security_inode_setsecctx() caller in
> fs/nfsd operate on a dentry even though both have a struct path
> available. Pass a const struct path so that the coming conversion of the
> xattr helpers can be reflected in the implementations; for now SELinux
> and Smack keep passing path->dentry and &nop_mnt_idmap to
> __vfs_setxattr_locked().
>
> Also document in lsm_hook_defs.h what a struct path argument may be used
> for: it can be passed to VFS helpers taking a struct path, but nothing is
> guaranteed about path->mnt.
>
> Signed-off-by: Cai Xinchen <caixinchen1 at huawei.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261117150542.1169451-1-caixinchen1@huawei.com?part=2
More information about the Linux-security-module-archive
mailing list