mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-06 00:20:29 +00:00
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
b63abbf63a
commit
b403765e8c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=343591
|
@ -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…
Reference in a new issue