[PATCH] sctp: Fix the link time qualifier of 'sctp_ctrlsock_exit()'

Subsystems: networking [general], sctp protocol, the rest

STALE2549d

3 messages, 3 authors, 2019-09-12 · open the first message on its own page

[PATCH] sctp: Fix the link time qualifier of 'sctp_ctrlsock_exit()'

From: Christophe JAILLET <hidden>
Date: 2019-09-11 16:02:53

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 <redacted>
---
 net/sctp/protocol.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
index 2d47adcb4cbe..53746ffeeca3 100644
--- a/net/sctp/protocol.c
+++ b/net/sctp/protocol.c
@@ -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);
-- 
2.20.1

Re: [PATCH] sctp: Fix the link time qualifier of 'sctp_ctrlsock_exit()'

From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Date: 2019-09-11 16:24:05

On Wed, Sep 11, 2019 at 06:02:39PM +0200, Christophe JAILLET wrote:
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 <redacted>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>

Re: [PATCH] sctp: Fix the link time qualifier of 'sctp_ctrlsock_exit()'

From: David Miller <davem@davemloft.net>
Date: 2019-09-12 11:56:45

From: Christophe JAILLET <redacted>
Date: Wed, 11 Sep 2019 18:02:39 +0200
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 <redacted>
Applied and queued up for -stable.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help