diff options
author | Patrick Talbert <ptalbert@redhat.com> | 2019-05-17 17:11:28 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-05-19 10:31:10 -0700 |
commit | ea9a03791a73e853897eda93e139018ca38f3c94 (patch) | |
tree | 476ac5b8a6585480fcac43801f706ed35a2abc4d /net/ipv4 | |
parent | c50a42b8f61f3492a0d3a1c7fb4932e19cf3e626 (diff) | |
download | linux-ea9a03791a73e853897eda93e139018ca38f3c94.tar.gz linux-ea9a03791a73e853897eda93e139018ca38f3c94.tar.bz2 linux-ea9a03791a73e853897eda93e139018ca38f3c94.zip |
net: Treat sock->sk_drops as an unsigned int when printing
Currently, procfs socket stats format sk_drops as a signed int (%d). For large
values this will cause a negative number to be printed.
We know the drop count can never be a negative so change the format specifier to
%u.
Signed-off-by: Patrick Talbert <ptalbert@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/ping.c | 2 | ||||
-rw-r--r-- | net/ipv4/raw.c | 2 | ||||
-rw-r--r-- | net/ipv4/udp.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c index 7ccb5f87f70b..834be7daeb32 100644 --- a/net/ipv4/ping.c +++ b/net/ipv4/ping.c @@ -1113,7 +1113,7 @@ static void ping_v4_format_sock(struct sock *sp, struct seq_file *f, __u16 srcp = ntohs(inet->inet_sport); seq_printf(f, "%5d: %08X:%04X %08X:%04X" - " %02X %08X:%08X %02X:%08lX %08X %5u %8d %lu %d %pK %d", + " %02X %08X:%08X %02X:%08lX %08X %5u %8d %lu %d %pK %u", bucket, src, srcp, dest, destp, sp->sk_state, sk_wmem_alloc_get(sp), sk_rmem_alloc_get(sp), diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c index dc91c27bb788..0e482f07b37f 100644 --- a/net/ipv4/raw.c +++ b/net/ipv4/raw.c @@ -1076,7 +1076,7 @@ static void raw_sock_seq_show(struct seq_file *seq, struct sock *sp, int i) srcp = inet->inet_num; seq_printf(seq, "%4d: %08X:%04X %08X:%04X" - " %02X %08X:%08X %02X:%08lX %08X %5u %8d %lu %d %pK %d\n", + " %02X %08X:%08X %02X:%08lX %08X %5u %8d %lu %d %pK %u\n", i, src, srcp, dest, destp, sp->sk_state, sk_wmem_alloc_get(sp), sk_rmem_alloc_get(sp), diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 3c58ba02af7d..8fb250ed53d4 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@ -2883,7 +2883,7 @@ static void udp4_format_sock(struct sock *sp, struct seq_file *f, __u16 srcp = ntohs(inet->inet_sport); seq_printf(f, "%5d: %08X:%04X %08X:%04X" - " %02X %08X:%08X %02X:%08lX %08X %5u %8d %lu %d %pK %d", + " %02X %08X:%08X %02X:%08lX %08X %5u %8d %lu %d %pK %u", bucket, src, srcp, dest, destp, sp->sk_state, sk_wmem_alloc_get(sp), udp_rqueue_get(sp), |