diff options
author | rwatson <rwatson@FreeBSD.org> | 2008-10-07 09:41:07 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2008-10-07 09:41:07 +0000 |
commit | a3e19e89bb67baa445c9522968d83c870592f61c (patch) | |
tree | 491d50c65bc3ec4ff213c0b160aad4cc7ff093c9 /sys/netinet | |
parent | 064d14f0bc93c6d6cb6ff33a782794a4624c25a0 (diff) | |
download | FreeBSD-src-a3e19e89bb67baa445c9522968d83c870592f61c.zip FreeBSD-src-a3e19e89bb67baa445c9522968d83c870592f61c.tar.gz |
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
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/tcp_input.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index e31bea1..7f25f57 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -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); |