When updating sb_flags, acquire the socket buffer lock to prevent
races.
This commit is contained in:
parent
c17a7759af
commit
7322ba7d8b
@ -319,8 +319,12 @@ nfs_connect(struct nfsmount *nmp, struct nfsreq *rep)
|
||||
error = soreserve(so, sndreserve, rcvreserve);
|
||||
if (error)
|
||||
goto bad;
|
||||
SOCKBUF_LOCK(&so->so_rcv);
|
||||
so->so_rcv.sb_flags |= SB_NOINTR;
|
||||
SOCKBUF_UNLOCK(&so->so_rcv);
|
||||
SOCKBUF_LOCK(&so->so_snd);
|
||||
so->so_snd.sb_flags |= SB_NOINTR;
|
||||
SOCKBUF_UNLOCK(&so->so_snd);
|
||||
|
||||
/* Initialize other non-zero congestion variables */
|
||||
nmp->nm_srtt[0] = nmp->nm_srtt[1] = nmp->nm_srtt[2] =
|
||||
|
Loading…
Reference in New Issue
Block a user