summaryrefslogtreecommitdiffstats
path: root/sys/netinet6
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2004-06-12 20:59:48 +0000
committerrwatson <rwatson@FreeBSD.org>2004-06-12 20:59:48 +0000
commitf66d897510d4772f7c5efd834cd66203558e9cb5 (patch)
treeb1449f92a55db26d8838886fa0578744995b9bf0 /sys/netinet6
parent82295697cd4bae93852c3a10a939f20227018fbd (diff)
downloadFreeBSD-src-f66d897510d4772f7c5efd834cd66203558e9cb5.zip
FreeBSD-src-f66d897510d4772f7c5efd834cd66203558e9cb5.tar.gz
Missed directory in previous commit; need to hold SOCK_LOCK(so)
before calling sotryfree(). -- Body of earlier bulk commit this belonged with -- Log: Extend coverage of SOCK_LOCK(so) to include so_count, the socket reference count: - Assert SOCK_LOCK(so) macros that directly manipulate so_count: soref(), sorele(). - Assert SOCK_LOCK(so) in macros/functions that rely on the state of so_count: sofree(), sotryfree(). - Acquire SOCK_LOCK(so) before calling these functions or macros in various contexts in the stack, both at the socket and protocol layers. - In some cases, perform soisdisconnected() before sotryfree(), as this could result in frobbing of a non-present socket if sotryfree() actually frees the socket. - Note that sofree()/sotryfree() will release the socket lock even if they don't free the socket. Submitted by: sam Sponsored by: FreeBSD Foundation Obtained from: BSD/OS
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/in6_pcb.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c
index 67f2326..b1a5a71 100644
--- a/sys/netinet6/in6_pcb.c
+++ b/sys/netinet6/in6_pcb.c
@@ -438,6 +438,7 @@ in6_pcbdetach(inp)
in_pcbremlists(inp);
if (so) {
+ SOCK_LOCK(so);
so->so_pcb = NULL;
sotryfree(so);
}
OpenPOWER on IntegriCloud