netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv2] ipv6: Fix inet6_init() cleanup order
@ 2013-11-16 20:17 Vlad Yasevich
  2013-11-16 20:26 ` Hannes Frederic Sowa
  0 siblings, 1 reply; 3+ messages in thread
From: Vlad Yasevich @ 2013-11-16 20:17 UTC (permalink / raw)
  To: netdev; +Cc: Vlad Yasevich, Hannes Frederic Sowa, Lorenzo Colitti,
	Fabio Estevam

Commit 6d0bfe22611602f36617bc7aa2ffa1bbb2f54c67
	net: ipv6: Add IPv6 support to the ping socket

introduced a change in the cleanup logic of inet6_init and
has a bug in that ipv6_packet_cleanup() may not be called.
Fix the cleanup ordering.

CC: Hannes Frederic Sowa <hannes@stressinduktion.org>
CC: Lorenzo Colitti <lorenzo@google.com>
CC: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Vlad Yasevich <vyasevich@gmail.com>
---
 net/ipv6/af_inet6.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
index 6468bda..56ca35b 100644
--- a/net/ipv6/af_inet6.c
+++ b/net/ipv6/af_inet6.c
@@ -958,10 +958,10 @@ out:
 
 #ifdef CONFIG_SYSCTL
 sysctl_fail:
-	ipv6_packet_cleanup();
+	pingv6_exit();
 #endif
 pingv6_fail:
-	pingv6_exit();
+	ipv6_packet_cleanup();
 ipv6_packet_fail:
 	tcpv6_exit();
 tcpv6_fail:
-- 
1.8.4.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-11-18 20:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-16 20:17 [PATCHv2] ipv6: Fix inet6_init() cleanup order Vlad Yasevich
2013-11-16 20:26 ` Hannes Frederic Sowa
2013-11-18 20:39   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).