Commit bea0127a authored by MichelleJin's avatar MichelleJin Committed by Zheng Zengkai
Browse files

net: ipv6: check return value of rhashtable_init

mainline inclusion
from mainline-v5.16-rc1
commit f04ed7d2
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I55ZC1
CVE: NA
backport: openEuler-22.03-LTS

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f04ed7d277e842af9934b71b529341d1ba31a9c1



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

When rhashtable_init() fails, it returns -EINVAL.
However, since error return value of rhashtable_init is not checked,
it can cause use of uninitialized pointers.
So, fix unhandled errors of rhashtable_init.

Signed-off-by: default avatarMichelleJin <shjy180909@gmail.com>
Reviewed-by: default avatarDavid Ahern <dsahern@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarXu Jia <xujia39@huawei.com>
Reviewed-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 516cbbc5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment