diff options
author | Hangbin Liu <liuhangbin@gmail.com> | 2024-05-09 21:18:11 +0800 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-05-10 19:27:46 -0700 |
commit | 6e370a771d2985107e82d0f6174381c1acb49c20 (patch) | |
tree | ce0749530cacd30dc3cbd51a8a2abebbbd2660c9 /net/ipv6 | |
parent | 3321687e321307629c71b664225b861ebf3e5753 (diff) | |
download | linux-stable-6e370a771d2985107e82d0f6174381c1acb49c20.tar.gz linux-stable-6e370a771d2985107e82d0f6174381c1acb49c20.tar.bz2 linux-stable-6e370a771d2985107e82d0f6174381c1acb49c20.zip |
ipv6: sr: fix incorrect unregister order
Commit 5559cea2d5aa ("ipv6: sr: fix possible use-after-free and
null-ptr-deref") changed the register order in seg6_init(). But the
unregister order in seg6_exit() is not updated.
Fixes: 5559cea2d5aa ("ipv6: sr: fix possible use-after-free and null-ptr-deref")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Reviewed-by: Sabrina Dubroca <sd@queasysnail.net>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://lore.kernel.org/r/20240509131812.1662197-3-liuhangbin@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/seg6.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/seg6.c b/net/ipv6/seg6.c index 5423f1f2aa62..c4ef96c8fdac 100644 --- a/net/ipv6/seg6.c +++ b/net/ipv6/seg6.c @@ -567,6 +567,6 @@ void seg6_exit(void) seg6_local_exit(); seg6_iptunnel_exit(); #endif - unregister_pernet_subsys(&ip6_segments_ops); genl_unregister_family(&seg6_genl_family); + unregister_pernet_subsys(&ip6_segments_ops); } |