From: James Hogan <jhogan@kernel•org>
To: "David S. Miller" <davem@davemloft•net>,
Alexey Kuznetsov <kuznet@ms2•inr.ac.ru>,
Hideaki YOSHIFUJI <yoshfuji@linux-ipv6•org>
Cc: James Hogan <jhogan@kernel•org>, netdev@vger•kernel.org
Subject: [PATCH] impr: Fix ptrdiff_t print formatting
Date: Tue, 30 Jan 2018 09:48:02 +0000 [thread overview]
Message-ID: <20180130094802.30147-1-jhogan@kernel.org> (raw)
ipmr_vif_seq_show() prints the difference between two pointers with the
format string %2zd (z for size_t), however the correct format string is
%2td instead (t for ptrdiff_t).
The same bug in ip6mr_vif_seq_show() was already fixed long ago by
commit d430a227d272 ("bogus format in ip6mr").
Signed-off-by: James Hogan <jhogan@kernel•org>
Cc: Alexey Kuznetsov <kuznet@ms2•inr.ac.ru>
Cc: "David S. Miller" <davem@davemloft•net>
Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6•org>
Cc: netdev@vger•kernel.org
---
net/ipv4/ipmr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
index fd5f19c988e4..0a279d99a532 100644
--- a/net/ipv4/ipmr.c
+++ b/net/ipv4/ipmr.c
@@ -3022,7 +3022,7 @@ static int ipmr_vif_seq_show(struct seq_file *seq, void *v)
const char *name = vif->dev ? vif->dev->name : "none";
seq_printf(seq,
- "%2zd %-10s %8ld %7ld %8ld %7ld %05X %08X %08X\n",
+ "%2td %-10s %8ld %7ld %8ld %7ld %05X %08X %08X\n",
vif - mrt->vif_table,
name, vif->bytes_in, vif->pkt_in,
vif->bytes_out, vif->pkt_out,
--
2.13.6
next reply other threads:[~2018-01-30 9:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-30 9:48 James Hogan [this message]
2018-01-30 14:21 ` [PATCH] impr: Fix ptrdiff_t print formatting David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180130094802.30147-1-jhogan@kernel.org \
--to=jhogan@kernel$(echo .)org \
--cc=davem@davemloft$(echo .)net \
--cc=kuznet@ms2$(echo .)inr.ac.ru \
--cc=netdev@vger$(echo .)kernel.org \
--cc=yoshfuji@linux-ipv6$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox