tuxillo's projects
/
dragonfly.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2808237
)
inpcb: in_pcblookup_addrport() must have been protected by port token
author
Sepherosa Ziehau
<sephe@dragonflybsd.org>
Sat, 15 Mar 2014 13:30:55 +0000
(21:30 +0800)
committer
Sepherosa Ziehau
<sephe@dragonflybsd.org>
Sat, 15 Mar 2014 13:30:55 +0000
(21:30 +0800)
sys/netinet/in_pcb.c
patch
|
blob
|
blame
|
history
diff --git
a/sys/netinet/in_pcb.c
b/sys/netinet/in_pcb.c
index
e753c54
..
20f948d
100644
(file)
--- a/
sys/netinet/in_pcb.c
+++ b/
sys/netinet/in_pcb.c
@@
-522,11
+522,11
@@
in_pcblookup_addrport(struct inpcbinfo *pcbinfo, struct in_addr laddr,
struct inpcb *match = NULL;
/*
- * If the porthashbase is shared across several cpus
we need
- *
to lock
.
+ * If the porthashbase is shared across several cpus
, it must
+ *
have been locked
.
*/
if (pcbinfo->porttoken)
-
lwkt_gettoken
(pcbinfo->porttoken);
+
ASSERT_LWKT_TOKEN_HELD
(pcbinfo->porttoken);
/*
* Best fit PCB lookup.
@@
-565,8
+565,6
@@
in_pcblookup_addrport(struct inpcbinfo *pcbinfo, struct in_addr laddr,
}
}
}
- if (pcbinfo->porttoken)
- lwkt_reltoken(pcbinfo->porttoken);
return (match);
}