Skip to content

Commit e6eb254

Browse files
liuhangbinaloktiwa
authored andcommitted
ipv6: sr: fix incorrect unregister order
[ Upstream commit 6e370a7 ] Commit 5559cea ("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: 5559cea ("ipv6: sr: fix possible use-after-free and null-ptr-deref") Signed-off-by: Hangbin Liu <[email protected]> Reviewed-by: Sabrina Dubroca <[email protected]> Reviewed-by: David Ahern <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: Sasha Levin <[email protected]> FOF: 0724 Signed-off-by: Alok Tiwari <[email protected]>
1 parent afc8919 commit e6eb254

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/ipv6/seg6.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,6 @@ void seg6_exit(void)
495495
#ifdef CONFIG_IPV6_SEG6_LWTUNNEL
496496
seg6_iptunnel_exit();
497497
#endif
498-
unregister_pernet_subsys(&ip6_segments_ops);
499498
genl_unregister_family(&seg6_genl_family);
499+
unregister_pernet_subsys(&ip6_segments_ops);
500500
}

0 commit comments

Comments
 (0)