]> www.infradead.org Git - users/dwmw2/linux.git/commit
net: x25: fix one potential use-after-free issue
authorlinzhang <xiaolou4617@gmail.com>
Wed, 17 May 2017 04:05:07 +0000 (12:05 +0800)
committerSasha Levin <alexander.levin@microsoft.com>
Wed, 23 May 2018 01:36:24 +0000 (21:36 -0400)
commit5326eeca3bd4cd335115479aa33ef97078a9363b
treefa494f6cd7097adbb99899812543859d682e2476
parent61c4fe0c31e50100d7434ebf51e9b1e7947f05ae
net: x25: fix one potential use-after-free issue

[ Upstream commit 64df6d525fcff1630098db9238bfd2b3e092d5c1 ]

The function x25_init is not properly unregister related resources
on error handler.It is will result in kernel oops if x25_init init
failed, so add properly unregister call on error handler.

Also, i adjust the coding style and make x25_register_sysctl properly
return failure.

Signed-off-by: linzhang <xiaolou4617@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
include/net/x25.h
net/x25/af_x25.c
net/x25/sysctl_net_x25.c