From 43272970daa84bf26cbcd4c7c4af1d16876b9c23 Mon Sep 17 00:00:00 2001 From: Chenyang Zhong Date: Wed, 28 Jul 2021 14:42:39 -0400 Subject: [PATCH] Revert "[REVERT 2/2] "selinux: ensure we cleanup the internal AVC counters on error in avc_update()"" An upstream commit from 4.14 has addressed this issue. This reverts commit 4c1dc99232b9489255c98eb9df1d3fad8a9ce5d6. Signed-off-by: Sorayukii --- security/selinux/avc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/selinux/avc.c b/security/selinux/avc.c index 45a40bdfabba..9e0ee7727238 100644 --- a/security/selinux/avc.c +++ b/security/selinux/avc.c @@ -907,7 +907,7 @@ static int avc_update_node(struct selinux_avc *avc, if (orig->ae.xp_node) { rc = avc_xperms_populate(node, orig->ae.xp_node); if (rc) { - kmem_cache_free(avc_node_cachep, node); + avc_node_kill(node); goto out_unlock; } }