]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
selinux: cleanup dentry and inodes on error in selinuxfs
authornixiaoming <nixiaoming@huawei.com>
Sun, 5 Aug 2018 09:10:36 +0000 (17:10 +0800)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 01:47:08 +0000 (19:47 -0600)
commit892f7b432b43427455d9ec0e6d6bbb5413ca0516
tree1ae0047da29483ca0902835d6057207ff08742e9
parent662e29d9ae67ab39138199514330695c7a5d4a4f
selinux: cleanup dentry and inodes on error in selinuxfs

BugLink: https://bugs.launchpad.net/bugs/1835972
[ Upstream commit 7e4237faa7213c1cc1d0aa65a44c67ba4729ce9f ]

If the resource requested by d_alloc_name is not added to the linked
list through d_add, then dput needs to be called to release the
subsequent abnormal branch to avoid resource leakage.

Add missing dput to selinuxfs.c

Signed-off-by: nixiaoming <nixiaoming@huawei.com>
[PM: tweak the subject line]
Signed-off-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
security/selinux/selinuxfs.c