kernfs: use simple_xattrs for security attributes
Replace the special handling of security xattrs with simple_xattrs, as is already done for the trusted xattrs. This simplifies the code and allows LSMs to use more than just a single xattr to do their business. Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com> Acked-by: Casey Schaufler <casey@schaufler-ca.com> [PM: manual merge fixes] Signed-off-by: Paul Moore <paul@paul-moore.com>
This commit is contained in:

committed by
Paul Moore

parent
b754026bd9
commit
0ac6075a32
@@ -532,9 +532,6 @@ void kernfs_put(struct kernfs_node *kn)
|
||||
kfree_const(kn->name);
|
||||
|
||||
if (kn->iattr) {
|
||||
if (kn->iattr->ia_secdata)
|
||||
security_release_secctx(kn->iattr->ia_secdata,
|
||||
kn->iattr->ia_secdata_len);
|
||||
simple_xattrs_free(&kn->iattr->xattrs);
|
||||
kmem_cache_free(kernfs_iattrs_cache, kn->iattr);
|
||||
}
|
||||
|
Reference in New Issue
Block a user