In nfs_down(), if rep can be NULL, which we test for, then we should
lock and unlock conditionally, not just set the flag on it conditionally. In practice, this bug couldn't manifest, as in the current revision of the code, no callers pass a NULL rep. CID: 1416 Found with: Coverity Prevent(tm)
This commit is contained in:
parent
355799f41f
commit
5d0dd109f4
@ -1888,10 +1888,11 @@ nfs_down(rep, nmp, td, msg, error, flags)
|
||||
} else
|
||||
mtx_unlock(&nmp->nm_mtx);
|
||||
#endif
|
||||
mtx_lock(&rep->r_mtx);
|
||||
if (rep)
|
||||
if (rep != NULL) {
|
||||
mtx_lock(&rep->r_mtx);
|
||||
rep->r_flags |= R_TPRINTFMSG;
|
||||
mtx_unlock(&rep->r_mtx);
|
||||
mtx_unlock(&rep->r_mtx);
|
||||
}
|
||||
nfs_msg(td, nmp->nm_mountp->mnt_stat.f_mntfromname, msg, error);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user