This is a note to let you know that I've just added the patch titled ipv6: sr: fix incorrect unregister order to the 5.15-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: ipv6-sr-fix-incorrect-unregister-order.patch and it can be found in the queue-5.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 1cc98156a0a95cfc66b888eb17628ae07b9c37fd Author: Hangbin Liu <liuhangbin@xxxxxxxxx> Date: Thu May 9 21:18:11 2024 +0800 ipv6: sr: fix incorrect unregister order [ Upstream commit 6e370a771d2985107e82d0f6174381c1acb49c20 ] 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@xxxxxxxxx> Reviewed-by: Sabrina Dubroca <sd@xxxxxxxxxxxxxxx> Reviewed-by: David Ahern <dsahern@xxxxxxxxxx> Link: https://lore.kernel.org/r/20240509131812.1662197-3-liuhangbin@xxxxxxxxx Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/net/ipv6/seg6.c b/net/ipv6/seg6.c index d626e0767a069..846c3abbcfb41 100644 --- a/net/ipv6/seg6.c +++ b/net/ipv6/seg6.c @@ -562,6 +562,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); }