diff options
author | Daniel Borkmann <dborkman@redhat.com> | 2013-09-03 12:24:02 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-09-04 00:27:28 -0400 |
commit | cc8c6c1b21c9b1e0f1e89428c07c7c52435cba0c (patch) | |
tree | 27f65c0861fc098f030f4411f20a32e17a2cb83a | |
parent | 3cc4a6784dfe26cd1aca55ef28b07eadbc09b960 (diff) |
net: tcp_probe: adapt tbuf size for recent changes
With recent changes in tcp_probe module (e.g. f925d0a62d ("net: tcp_probe:
add IPv6 support")) we also need to take into account that tbuf needs to
be updated as format string will be further expanded. tbuf sits on the stack
in tcpprobe_read() function that is invoked when user space reads procfs
file /proc/net/tcpprobe, hence not fast path as in jtcp_rcv_established().
Having a size similarly as in sctp_probe module of 256 bytes is fully
sufficient for that, we need theoretical maximum of 252 bytes otherwise we
could get truncated.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/ipv4/tcp_probe.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp_probe.c b/net/ipv4/tcp_probe.c index 622a4377b397..1f6aa543b64e 100644 --- a/net/ipv4/tcp_probe.c +++ b/net/ipv4/tcp_probe.c | |||
@@ -218,7 +218,7 @@ static ssize_t tcpprobe_read(struct file *file, char __user *buf, | |||
218 | return -EINVAL; | 218 | return -EINVAL; |
219 | 219 | ||
220 | while (cnt < len) { | 220 | while (cnt < len) { |
221 | char tbuf[164]; | 221 | char tbuf[256]; |
222 | int width; | 222 | int width; |
223 | 223 | ||
224 | /* Wait for data in buffer */ | 224 | /* Wait for data in buffer */ |