From: Christophe JAILLET Date: Wed, 11 Sep 2019 16:02:39 +0000 (+0200) Subject: sctp: Fix the link time qualifier of 'sctp_ctrlsock_exit()' X-Git-Tag: v4.14.145~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e90daafad0dc80374bd204a404f030a5efa0b3ac;p=thirdparty%2Fkernel%2Fstable.git sctp: Fix the link time qualifier of 'sctp_ctrlsock_exit()' [ Upstream commit b456d72412ca8797234449c25815e82f4e1426c0 ] The '.exit' functions from 'pernet_operations' structure should be marked as __net_exit, not __net_init. Fixes: 8e2d61e0aed2 ("sctp: fix race on protocol/netns initialization") Signed-off-by: Christophe JAILLET Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c index a7529aca2ac82..6af871b1c297d 100644 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c @@ -1344,7 +1344,7 @@ static int __net_init sctp_ctrlsock_init(struct net *net) return status; } -static void __net_init sctp_ctrlsock_exit(struct net *net) +static void __net_exit sctp_ctrlsock_exit(struct net *net) { /* Free the control endpoint. */ inet_ctl_sock_destroy(net->sctp.ctl_sock);