]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
selinux: Fix error return code in sel_ib_pkey_sid_slow()
authorChen Zhou <chenzhou10@huawei.com>
Thu, 12 Nov 2020 13:53:32 +0000 (21:53 +0800)
committerStefan Bader <stefan.bader@canonical.com>
Thu, 10 Dec 2020 11:06:37 +0000 (12:06 +0100)
commit69f7fd645c4f926678a4ab7ca37f688f1778539b
tree30e1cb478d41c876ceae225467c77d1e165c5e66
parentce4dec2483decbd2c167dc373e1b4d518201b99f
selinux: Fix error return code in sel_ib_pkey_sid_slow()

BugLink: https://bugs.launchpad.net/bugs/1905618
commit c350f8bea271782e2733419bd2ab9bf4ec2051ef upstream.

Fix to return a negative error code from the error handling case
instead of 0 in function sel_ib_pkey_sid_slow(), as done elsewhere
in this function.

Cc: stable@vger.kernel.org
Fixes: 409dcf31538a ("selinux: Add a cache for quicker retreival of PKey SIDs")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Chen Zhou <chenzhou10@huawei.com>
Signed-off-by: Paul Moore <paul@paul-moore.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/ibpkey.c