Don't pass curthread to sbreserve_locked() in tcp_do_segment(), as the
netisr or ithread's socket buffer size limit is not the right limit to use. Instead, pass NULL as the other two calls to sbreserve_locked() in the TCP input path (tcp_mss()) do. In practice, this is a no-op, as ithreads and the netisr run without a process limit on socket buffer use, and a NULL thread pointer leads to not using the process's limit, if any. However, if tcp_input() is called in other contexts that do have limits, this may prevent the incorrect limit from being used. MFC after: 3 days
This commit is contained in:
parent
58f7ce962c
commit
6c8286e42d
@ -1294,7 +1294,7 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so,
|
||||
*/
|
||||
if (newsize)
|
||||
if (!sbreserve_locked(&so->so_rcv,
|
||||
newsize, so, curthread))
|
||||
newsize, so, NULL))
|
||||
so->so_rcv.sb_flags &= ~SB_AUTOSIZE;
|
||||
m_adj(m, drop_hdrlen); /* delayed header drop */
|
||||
sbappendstream_locked(&so->so_rcv, m);
|
||||
|
Loading…
x
Reference in New Issue
Block a user