diff options
author | Robert Watson <rwatson@FreeBSD.org> | 2006-04-25 12:09:58 +0000 |
---|---|---|
committer | Robert Watson <rwatson@FreeBSD.org> | 2006-04-25 12:09:58 +0000 |
commit | 8deea4a8f3e24373706aa85e9f09c19acd8e9454 (patch) | |
tree | 011200dff73d659a24e0ad1366f3cbf766fe9876 /sys/netinet6/in6_src.c | |
parent | 102ea03373d20f59d1933a3c06e255575c8e8b8b (diff) | |
download | src-8deea4a8f3e24373706aa85e9f09c19acd8e9454.tar.gz src-8deea4a8f3e24373706aa85e9f09c19acd8e9454.zip |
Move lock assertions to top of in6_pcbladdr(): we still want them to run
even if we're going to return an argument-based error.
Assert pcbinfo lock in in6_pcblookup_local(), in6_pcblookup_hash(), since
they walk pcbinfo inpcb lists.
Assert inpcb and pcbinfo locks in in6_pcbsetport(), since
port reservations are changing.
MFC after: 3 months
Notes
Notes:
svn path=/head/; revision=158011
Diffstat (limited to 'sys/netinet6/in6_src.c')
-rw-r--r-- | sys/netinet6/in6_src.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/netinet6/in6_src.c b/sys/netinet6/in6_src.c index 61cf9db51ec8..bedb3a4cb88f 100644 --- a/sys/netinet6/in6_src.c +++ b/sys/netinet6/in6_src.c @@ -760,6 +760,9 @@ in6_pcbsetport(laddr, inp, cred) int count, error = 0, wild = 0; struct inpcbinfo *pcbinfo = inp->inp_pcbinfo; + INP_INFO_WLOCK_ASSERT(pcbinfo); + INP_LOCK_ASSERT(inp); + /* XXX: this is redundant when called from in6_pcbbind */ if ((so->so_options & (SO_REUSEADDR|SO_REUSEPORT)) == 0) wild = INPLOOKUP_WILDCARD; |