]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
sctp: Unwind address notifier registration on failure
authorYuho Choi <dbgh9129@gmail.com>
Mon, 8 Jun 2026 16:22:30 +0000 (12:22 -0400)
committerJakub Kicinski <kuba@kernel.org>
Wed, 10 Jun 2026 15:28:40 +0000 (08:28 -0700)
commitc8459ee2fef502d6ef6c063751c33d9ac7943eab
tree3d42d111e52a7963523cfdcff7ca283e469efad5
parent1225253dc50ce7154d3c0247c11f1e8b3ec92aeb
sctp: Unwind address notifier registration on failure

sctp_v4_add_protocol() and sctp_v6_add_protocol() register their
address notifiers before registering the SCTP protocol handlers. If
protocol registration fails, the functions return without unregistering
the notifiers.

Unregister the notifiers on the protocol registration failure paths.
Also propagate notifier registration failures instead of ignoring them.

Signed-off-by: Yuho Choi <dbgh9129@gmail.com>
Link: https://patch.msgid.link/20260608162230.46644-1-dbgh9129@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/sctp/ipv6.c
net/sctp/protocol.c