[PATCH v2 -next 05/18] LSM: pass struct path to the inode_setattr hook
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Thu Oct 15 12:32:14 UTC 2026
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] smack: outdated kernel-doc for smack_inode_setattr
--
commit fc2e9041a9cd4acf5cf778a4a5188a00f3450d29
Author: Cai Xinchen <caixinchen1 at huawei.com>
LSM: pass struct path to the inode_setattr hook
This commit updates the inode_setattr hook and its LSM implementations
(SELinux, Smack, EVM) to take a const struct path pointer instead of
deriving the idmap and dentry separately.
[ ... ]
> diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
> index 42b028bbcd028..fdc74ca0e8702 100644
> --- a/security/smack/smack_lsm.c
> +++ b/security/smack/smack_lsm.c
> @@ -1272,10 +1272,11 @@ static int smack_inode_permission(const struct mnt_idmap *idmap, struct inode *i
> *
> * Returns 0 if access is permitted, an error code otherwise
> */
> -static int smack_inode_setattr(const struct mnt_idmap *idmap, struct dentry *dentry,
> +static int smack_inode_setattr(const struct path *path,
> struct iattr *iattr)
[Severity: Low]
Are the idmap and dentry parameters still referenced in the kernel-doc comment
just above this function?
The function signature for smack_inode_setattr was updated to take a single
path argument, but the documentation block does not appear to be updated to
match. This could leave the documentation out of sync with the implementation
and cause a kernel-doc warning during the build process.
> {
> struct smk_audit_info ad;
> + struct dentry *dentry = path->dentry;
> int rc;
>
> /*
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261015125425.3246251-1-caixinchen1@huawei.com?part=5
More information about the Linux-security-module-archive
mailing list