Module Name: src Committed By: rmind Date: Sun Sep 7 00:50:57 UTC 2014
Modified Files: src/sys/netinet: in_pcb.c src/sys/netinet6: in6_pcb.c Log Message: in_pcbdetach: move ip_freemoptions() under softnet_lock for now (this will be changed back once other IP paths become MP-safe). Same for IPv6 routine. This partially reverts 1.150 of in_pcb.c and 1.127 of in6_pcb.c changes. To generate a diff of this commit: cvs rdiff -u -r1.151 -r1.152 src/sys/netinet/in_pcb.c cvs rdiff -u -r1.128 -r1.129 src/sys/netinet6/in6_pcb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/netinet/in_pcb.c diff -u src/sys/netinet/in_pcb.c:1.151 src/sys/netinet/in_pcb.c:1.152 --- src/sys/netinet/in_pcb.c:1.151 Tue Aug 5 05:24:26 2014 +++ src/sys/netinet/in_pcb.c Sun Sep 7 00:50:56 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: in_pcb.c,v 1.151 2014/08/05 05:24:26 rtr Exp $ */ +/* $NetBSD: in_pcb.c,v 1.152 2014/09/07 00:50:56 rmind Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -93,7 +93,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: in_pcb.c,v 1.151 2014/08/05 05:24:26 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in_pcb.c,v 1.152 2014/09/07 00:50:56 rmind Exp $"); #include "opt_inet.h" #include "opt_ipsec.h" @@ -606,9 +606,9 @@ in_pcbdetach(void *v) m_free(inp->inp_options); } rtcache_free(&inp->inp_route); + ip_freemoptions(inp->inp_moptions); sofree(so); /* drops the socket's lock */ - ip_freemoptions(inp->inp_moptions); pool_put(&inpcb_pool, inp); mutex_enter(softnet_lock); /* reacquire the softnet_lock */ } Index: src/sys/netinet6/in6_pcb.c diff -u src/sys/netinet6/in6_pcb.c:1.128 src/sys/netinet6/in6_pcb.c:1.129 --- src/sys/netinet6/in6_pcb.c:1.128 Tue Aug 5 05:24:27 2014 +++ src/sys/netinet6/in6_pcb.c Sun Sep 7 00:50:56 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: in6_pcb.c,v 1.128 2014/08/05 05:24:27 rtr Exp $ */ +/* $NetBSD: in6_pcb.c,v 1.129 2014/09/07 00:50:56 rmind Exp $ */ /* $KAME: in6_pcb.c,v 1.84 2001/02/08 18:02:08 itojun Exp $ */ /* @@ -62,7 +62,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: in6_pcb.c,v 1.128 2014/08/05 05:24:27 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in6_pcb.c,v 1.129 2014/09/07 00:50:56 rmind Exp $"); #include "opt_inet.h" #include "opt_ipsec.h" @@ -617,9 +617,9 @@ in6_pcbdetach(struct in6pcb *in6p) free(in6p->in6p_outputopts, M_IP6OPT); } rtcache_free(&in6p->in6p_route); + ip6_freemoptions(in6p->in6p_moptions); sofree(so); /* drops the socket's lock */ - ip6_freemoptions(in6p->in6p_moptions); pool_put(&in6pcb_pool, in6p); mutex_enter(softnet_lock); /* reacquire it */ }