Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151728123
D17335.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D17335.id.diff
View Options
Index: head/sys/netinet/in_pcb.h
===================================================================
--- head/sys/netinet/in_pcb.h
+++ head/sys/netinet/in_pcb.h
@@ -642,6 +642,8 @@
#define INP_INFO_LOCK_ASSERT(ipi) MPASS(in_epoch(net_epoch_preempt) || mtx_owned(&(ipi)->ipi_lock))
#define INP_INFO_RLOCK_ASSERT(ipi) MPASS(in_epoch(net_epoch_preempt))
#define INP_INFO_WLOCK_ASSERT(ipi) mtx_assert(&(ipi)->ipi_lock, MA_OWNED)
+#define INP_INFO_WUNLOCK_ASSERT(ipi) \
+ mtx_assert(&(ipi)->ipi_lock, MA_NOTOWNED)
#define INP_INFO_UNLOCK_ASSERT(ipi) MPASS(!in_epoch(net_epoch_preempt) && !mtx_owned(&(ipi)->ipi_lock))
#define INP_LIST_LOCK_INIT(ipi, d) \
Index: head/sys/netinet/siftr.c
===================================================================
--- head/sys/netinet/siftr.c
+++ head/sys/netinet/siftr.c
@@ -710,7 +710,7 @@
struct inpcb *inp;
/* We need the tcbinfo lock. */
- INP_INFO_UNLOCK_ASSERT(&V_tcbinfo);
+ INP_INFO_WUNLOCK_ASSERT(&V_tcbinfo);
if (dir == PFIL_IN)
inp = (ipver == INP_IPV4 ?
Index: head/sys/netinet/tcp_hpts.c
===================================================================
--- head/sys/netinet/tcp_hpts.c
+++ head/sys/netinet/tcp_hpts.c
@@ -1282,7 +1282,7 @@
* lock again but we also need some kasserts
* here.
*/
- INP_INFO_UNLOCK_ASSERT(&V_tcbinfo);
+ INP_INFO_WUNLOCK_ASSERT(&V_tcbinfo);
INP_UNLOCK_ASSERT(inp);
m = n;
if (m)
@@ -1324,7 +1324,7 @@
INP_WUNLOCK(inp);
if (ti_locked == TI_RLOCKED)
INP_INFO_RUNLOCK_ET(&V_tcbinfo, et);
- INP_INFO_UNLOCK_ASSERT(&V_tcbinfo);
+ INP_INFO_WUNLOCK_ASSERT(&V_tcbinfo);
INP_UNLOCK_ASSERT(inp);
ti_locked = TI_UNLOCKED;
mtx_lock(&hpts->p_mtx);
Index: head/sys/netinet/tcp_input.c
===================================================================
--- head/sys/netinet/tcp_input.c
+++ head/sys/netinet/tcp_input.c
@@ -800,7 +800,7 @@
if (ti_locked == TI_RLOCKED) {
INP_INFO_RLOCK_ASSERT(&V_tcbinfo);
} else {
- INP_INFO_UNLOCK_ASSERT(&V_tcbinfo);
+ INP_INFO_WUNLOCK_ASSERT(&V_tcbinfo);
}
#endif
#ifdef INET6
@@ -1358,7 +1358,7 @@
INP_INFO_RUNLOCK_ET(&V_tcbinfo, et);
ti_locked = TI_UNLOCKED;
}
- INP_INFO_UNLOCK_ASSERT(&V_tcbinfo);
+ INP_INFO_WUNLOCK_ASSERT(&V_tcbinfo);
return (IPPROTO_DONE);
} else if (tp->t_state == TCPS_LISTEN) {
/*
@@ -1405,7 +1405,7 @@
else {
KASSERT(ti_locked == TI_UNLOCKED, ("%s: dropwithreset "
"ti_locked: %d", __func__, ti_locked));
- INP_INFO_UNLOCK_ASSERT(&V_tcbinfo);
+ INP_INFO_WUNLOCK_ASSERT(&V_tcbinfo);
}
#endif
@@ -1429,7 +1429,7 @@
else {
KASSERT(ti_locked == TI_UNLOCKED, ("%s: dropunlock "
"ti_locked: %d", __func__, ti_locked));
- INP_INFO_UNLOCK_ASSERT(&V_tcbinfo);
+ INP_INFO_WUNLOCK_ASSERT(&V_tcbinfo);
}
#endif
@@ -1437,7 +1437,7 @@
INP_WUNLOCK(inp);
drop:
- INP_INFO_UNLOCK_ASSERT(&V_tcbinfo);
+ INP_INFO_WUNLOCK_ASSERT(&V_tcbinfo);
if (s != NULL)
free(s, M_TCPLOG);
if (m != NULL)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 11, 7:33 AM (18 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31199915
Default Alt Text
D17335.id.diff (2 KB)
Attached To
Mode
D17335: Relax INP_INFO_UNLOCK_ASSERT() assertion in tcp_input()
Attached
Detach File
Event Timeline
Log In to Comment