Commit ac3e27c1 authored by Christian Göttsche's avatar Christian Göttsche Committed by Zheng Zengkai
Browse files

selinux: use correct type for context length

stable inclusion
from stable-v5.10.110
commit 4b9b60b5bfc86b9ee7f02c822de4f13116e118c3
bugzilla: https://gitee.com/openeuler/kernel/issues/I574AL

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=4b9b60b5bfc86b9ee7f02c822de4f13116e118c3



--------------------------------

[ Upstream commit b97df7c0 ]

security_sid_to_context() expects a pointer to an u32 as the address
where to store the length of the computed context.

Reported by sparse:

    security/selinux/xfrm.c:359:39: warning: incorrect type in arg 4
                                    (different signedness)
    security/selinux/xfrm.c:359:39:    expected unsigned int
                                       [usertype] *scontext_len
    security/selinux/xfrm.c:359:39:    got int *

Signed-off-by: default avatarChristian Göttsche <cgzones@googlemail.com>
[PM: wrapped commit description]
Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarYu Liao <liaoyu15@huawei.com>
Reviewed-by: default avatarWei Li <liwei391@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent e2f28f66
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment