MFC r343591:

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
This commit is contained in:
Cy Schubert 2019-02-14 00:52:03 +00:00
parent 19b7e9b2eb
commit 2f0b37465d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/stable/10/; revision=344113

View File

@ -1909,21 +1909,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;
}