Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F150724363
D29739.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D29739.diff
View Options
diff --git a/sys/dev/cxgbe/tom/t4_listen.c b/sys/dev/cxgbe/tom/t4_listen.c
--- a/sys/dev/cxgbe/tom/t4_listen.c
+++ b/sys/dev/cxgbe/tom/t4_listen.c
@@ -643,7 +643,7 @@
{
struct synq_entry *synqe;
- INP_WLOCK_ASSERT(lctx->inp);
+ INP_RLOCK_ASSERT(lctx->inp);
MPASS(flags == M_WAITOK || flags == M_NOWAIT);
synqe = malloc(sizeof(*synqe), M_CXGBE, flags);
@@ -1323,11 +1323,11 @@
}
inp = lctx->inp; /* listening socket, not owned by TOE */
- INP_WLOCK(inp);
+ INP_RLOCK(inp);
/* Don't offload if the listening socket has closed */
if (__predict_false(inp->inp_flags & INP_DROPPED)) {
- INP_WUNLOCK(inp);
+ INP_RUNLOCK(inp);
NET_EPOCH_EXIT(et);
REJECT_PASS_ACCEPT_REQ(false);
}
@@ -1337,14 +1337,14 @@
EVL_MAKETAG(0xfff, 0, 0), inp);
rw_runlock(&sc->policy_lock);
if (!settings.offload) {
- INP_WUNLOCK(inp);
+ INP_RUNLOCK(inp);
NET_EPOCH_EXIT(et);
REJECT_PASS_ACCEPT_REQ(true); /* Rejected by COP. */
}
synqe = alloc_synqe(sc, lctx, M_NOWAIT);
if (synqe == NULL) {
- INP_WUNLOCK(inp);
+ INP_RUNLOCK(inp);
NET_EPOCH_EXIT(et);
REJECT_PASS_ACCEPT_REQ(true);
}
diff --git a/sys/netinet/toecore.c b/sys/netinet/toecore.c
--- a/sys/netinet/toecore.c
+++ b/sys/netinet/toecore.c
@@ -349,7 +349,7 @@
struct inpcb *inp, void *tod, void *todctx, uint8_t iptos)
{
- INP_WLOCK_ASSERT(inp);
+ INP_RLOCK_ASSERT(inp);
(void )syncache_add(inc, to, th, inp, inp->inp_socket, NULL, tod,
todctx, iptos);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 4, 3:29 PM (6 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30797057
Default Alt Text
D29739.diff (1 KB)
Attached To
Mode
D29739: TOE: Use a read lock on the PCB for syncache_add().
Attached
Detach File
Event Timeline
Log In to Comment