mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-27 16:39:08 +00:00
Remove unnecessary locking of divcbinfo lock from div_output(): this has not
been required since FreeBSD 7.0 when the so_pcb pointer leading to inp was guaranteed to be stable when a valid socket reference is held (as it is in the output path). MFC after: 1 week Reviewed by: bz Sponsored by: Juniper Networks
This commit is contained in:
parent
8296cddfdd
commit
1d7429e0a9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=204810
@ -385,7 +385,6 @@ div_output(struct socket *so, struct mbuf *m, struct sockaddr_in *sin,
|
|||||||
struct inpcb *inp;
|
struct inpcb *inp;
|
||||||
|
|
||||||
dt->info |= IPFW_IS_DIVERT | IPFW_INFO_OUT;
|
dt->info |= IPFW_IS_DIVERT | IPFW_INFO_OUT;
|
||||||
INP_INFO_WLOCK(&V_divcbinfo);
|
|
||||||
inp = sotoinpcb(so);
|
inp = sotoinpcb(so);
|
||||||
INP_RLOCK(inp);
|
INP_RLOCK(inp);
|
||||||
/*
|
/*
|
||||||
@ -396,7 +395,6 @@ div_output(struct socket *so, struct mbuf *m, struct sockaddr_in *sin,
|
|||||||
((u_short)ntohs(ip->ip_len) > m->m_pkthdr.len)) {
|
((u_short)ntohs(ip->ip_len) > m->m_pkthdr.len)) {
|
||||||
error = EINVAL;
|
error = EINVAL;
|
||||||
INP_RUNLOCK(inp);
|
INP_RUNLOCK(inp);
|
||||||
INP_INFO_WUNLOCK(&V_divcbinfo);
|
|
||||||
m_freem(m);
|
m_freem(m);
|
||||||
} else {
|
} else {
|
||||||
/* Convert fields to host order for ip_output() */
|
/* Convert fields to host order for ip_output() */
|
||||||
@ -437,7 +435,6 @@ div_output(struct socket *so, struct mbuf *m, struct sockaddr_in *sin,
|
|||||||
error = ENOBUFS;
|
error = ENOBUFS;
|
||||||
}
|
}
|
||||||
INP_RUNLOCK(inp);
|
INP_RUNLOCK(inp);
|
||||||
INP_INFO_WUNLOCK(&V_divcbinfo);
|
|
||||||
if (error == ENOBUFS) {
|
if (error == ENOBUFS) {
|
||||||
m_freem(m);
|
m_freem(m);
|
||||||
return (error);
|
return (error);
|
||||||
|
Loading…
Reference in New Issue
Block a user