nm_srtt and nm_sdrtt are arrays[4]. Remove explicit initialization
of element [4] in both, which goes beyond the end of the array, leaving [0], [1], [2], and [3]. This bug did not cause any problems since the overrun fields are initialized after the bogus array init but needs to be fixed anyway. Submitted by: Ian Dowse <iedowse@maths.tcd.ie>
This commit is contained in:
parent
907b750c0c
commit
b314ed9662
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=53552
@ -347,10 +347,10 @@ nfs_connect(nmp, rep)
|
||||
so->so_snd.sb_flags |= SB_NOINTR;
|
||||
|
||||
/* Initialize other non-zero congestion variables */
|
||||
nmp->nm_srtt[0] = nmp->nm_srtt[1] = nmp->nm_srtt[2] = nmp->nm_srtt[3] =
|
||||
nmp->nm_srtt[4] = (NFS_TIMEO << 3);
|
||||
nmp->nm_srtt[0] = nmp->nm_srtt[1] = nmp->nm_srtt[2] =
|
||||
nmp->nm_srtt[3] = (NFS_TIMEO << 3);
|
||||
nmp->nm_sdrtt[0] = nmp->nm_sdrtt[1] = nmp->nm_sdrtt[2] =
|
||||
nmp->nm_sdrtt[3] = nmp->nm_sdrtt[4] = 0;
|
||||
nmp->nm_sdrtt[3] = 0;
|
||||
nmp->nm_cwnd = NFS_MAXCWND / 2; /* Initial send window */
|
||||
nmp->nm_sent = 0;
|
||||
nmp->nm_timeouts = 0;
|
||||
|
@ -347,10 +347,10 @@ nfs_connect(nmp, rep)
|
||||
so->so_snd.sb_flags |= SB_NOINTR;
|
||||
|
||||
/* Initialize other non-zero congestion variables */
|
||||
nmp->nm_srtt[0] = nmp->nm_srtt[1] = nmp->nm_srtt[2] = nmp->nm_srtt[3] =
|
||||
nmp->nm_srtt[4] = (NFS_TIMEO << 3);
|
||||
nmp->nm_srtt[0] = nmp->nm_srtt[1] = nmp->nm_srtt[2] =
|
||||
nmp->nm_srtt[3] = (NFS_TIMEO << 3);
|
||||
nmp->nm_sdrtt[0] = nmp->nm_sdrtt[1] = nmp->nm_sdrtt[2] =
|
||||
nmp->nm_sdrtt[3] = nmp->nm_sdrtt[4] = 0;
|
||||
nmp->nm_sdrtt[3] = 0;
|
||||
nmp->nm_cwnd = NFS_MAXCWND / 2; /* Initial send window */
|
||||
nmp->nm_sent = 0;
|
||||
nmp->nm_timeouts = 0;
|
||||
|
@ -347,10 +347,10 @@ nfs_connect(nmp, rep)
|
||||
so->so_snd.sb_flags |= SB_NOINTR;
|
||||
|
||||
/* Initialize other non-zero congestion variables */
|
||||
nmp->nm_srtt[0] = nmp->nm_srtt[1] = nmp->nm_srtt[2] = nmp->nm_srtt[3] =
|
||||
nmp->nm_srtt[4] = (NFS_TIMEO << 3);
|
||||
nmp->nm_srtt[0] = nmp->nm_srtt[1] = nmp->nm_srtt[2] =
|
||||
nmp->nm_srtt[3] = (NFS_TIMEO << 3);
|
||||
nmp->nm_sdrtt[0] = nmp->nm_sdrtt[1] = nmp->nm_sdrtt[2] =
|
||||
nmp->nm_sdrtt[3] = nmp->nm_sdrtt[4] = 0;
|
||||
nmp->nm_sdrtt[3] = 0;
|
||||
nmp->nm_cwnd = NFS_MAXCWND / 2; /* Initial send window */
|
||||
nmp->nm_sent = 0;
|
||||
nmp->nm_timeouts = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user