OSDN Git Service

sctp: Fix the link time qualifier of 'sctp_ctrlsock_exit()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Wed, 11 Sep 2019 16:02:39 +0000 (18:02 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 12 Sep 2019 11:55:28 +0000 (12:55 +0100)
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 <christophe.jaillet@wanadoo.fr>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/protocol.c

index 2d47adc..53746ff 100644 (file)
@@ -1336,7 +1336,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);