diff options
| author | Stephen Smalley <stephen.smalley.work@gmail.com> | 2025-02-20 14:29:36 -0500 |
|---|---|---|
| committer | Anna Schumaker <anna.schumaker@oracle.com> | 2025-02-25 15:07:24 -0500 |
| commit | 9084ed79ddaaaa1ec01cd304af9fb532c26252db (patch) | |
| tree | 641ca5f17465cdc54df025981d040e051b6b597c /include/linux/nfs4.h | |
| parent | 1f7a4f98c11fbeb18ed21f3b3a497e90a50ad2e0 (diff) | |
lsm,nfs: fix memory leak of lsm_context
commit b530104f50e8 ("lsm: lsm_context in security_dentry_init_security")
did not preserve the lsm id for subsequent release calls, which results
in a memory leak. Fix it by saving the lsm id in the nfs4_label and
providing it on the subsequent release call.
Fixes: b530104f50e8 ("lsm: lsm_context in security_dentry_init_security")
Signed-off-by: Stephen Smalley <stephen.smalley.work@gmail.com>
Acked-by: Paul Moore <paul@paul-moore.com>
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
Diffstat (limited to 'include/linux/nfs4.h')
| -rw-r--r-- | include/linux/nfs4.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h index 71fbebfa43c7..9ac83ca88326 100644 --- a/include/linux/nfs4.h +++ b/include/linux/nfs4.h @@ -47,6 +47,7 @@ struct nfs4_acl { struct nfs4_label { uint32_t lfs; uint32_t pi; + u32 lsmid; u32 len; char *label; }; |
