Do not obtain an already held read lock. This causes a witness panic when
ipfs is invoked. This is the second of two panics resolving PR 235110. PR: 235110 Reported by: David.Boyd49@twc.com MFC after: 2 weeks
This commit is contained in:
parent
a20568516f
commit
185e0e4bed
@ -1904,21 +1904,17 @@ ipf_nat_getent(softc, data, getlock)
|
||||
}
|
||||
}
|
||||
if (error == 0) {
|
||||
if (getlock) {
|
||||
READ_ENTER(&softc->ipf_nat);
|
||||
getlock = 0;
|
||||
}
|
||||
error = ipf_outobjsz(softc, data, ipn, IPFOBJ_NATSAVE,
|
||||
ipns.ipn_dsize);
|
||||
}
|
||||
|
||||
finished:
|
||||
if (getlock) {
|
||||
READ_ENTER(&softc->ipf_nat);
|
||||
}
|
||||
if (ipn != NULL) {
|
||||
KFREES(ipn, ipns.ipn_dsize);
|
||||
}
|
||||
if (getlock) {
|
||||
RWLOCK_EXIT(&softc->ipf_nat);
|
||||
}
|
||||
return error;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user