If we get a receive error in nfs_receive() and then get an error trying to
obtain the send lock, we would bogusly try to unlock the send lock before returning resulting in a panic. Instead, only unlock the send lock if nfs_sndlock() succeeds and nfs_reconnect() fails. MFC after: 3 days Sponsored by: The Weather Channel
This commit is contained in:
parent
c0d792ed96
commit
9618cc94df
@ -643,12 +643,13 @@ nfs_receive(struct nfsreq *rep, struct sockaddr **aname, struct mbuf **mp)
|
||||
error,
|
||||
rep->r_nmp->nm_mountp->mnt_stat.f_mntfromname);
|
||||
error = nfs_sndlock(rep);
|
||||
if (!error)
|
||||
if (!error) {
|
||||
error = nfs_reconnect(rep);
|
||||
if (!error)
|
||||
goto tryagain;
|
||||
else
|
||||
nfs_sndunlock(rep);
|
||||
if (!error)
|
||||
goto tryagain;
|
||||
else
|
||||
nfs_sndunlock(rep);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ((so = rep->r_nmp->nm_so) == NULL)
|
||||
|
Loading…
Reference in New Issue
Block a user