Re: [PATCH v2] selinux: Fix error return code in sel_ib_pkey_sid_slow()

From: Paul Moore
Date: Thu Nov 12 2020 - 20:17:39 EST


On Thu, Nov 12, 2020 at 8:48 AM Chen Zhou <chenzhou10@xxxxxxxxxx> wrote:
>
> 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.
>
> Fixes: 409dcf31538a ("selinux: Add a cache for quicker retreival of PKey SIDs")
> Reported-by: Hulk Robot <hulkci@xxxxxxxxxx>
> Signed-off-by: Chen Zhou <chenzhou10@xxxxxxxxxx>
> ---
> security/selinux/ibpkey.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)

Thanks for the fix! I've merged this into the selinux/stable-5.10
branch and I'll send this up to Linus tomorrow or early next week.

--
paul moore
www.paul-moore.com