netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Forney <mforney@mforney.org>
To: netdev@vger.kernel.org
Subject: [PATCH] ipmroute: Prevent overlapping storage of `filter` global
Date: Sun, 16 Jun 2019 14:46:02 -0700	[thread overview]
Message-ID: <20190616214602.20546-1-mforney@mforney.org> (raw)

This variable has the same name as `struct xfrm_filter filter` in
ip/ipxfrm.c, but overrides that definition since `struct rtfilter`
is larger.

This is visible when built with -Wl,--warn-common in LDFLAGS:

	/usr/bin/ld: ipxfrm.o: warning: common of `filter' overridden by larger common from ipmroute.o

Signed-off-by: Michael Forney <mforney@mforney.org>
---
I'm not sure if this causes any problems in practice, but it seems
unintended.

 ip/ipmroute.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ip/ipmroute.c b/ip/ipmroute.c
index 8b3c4c25..656ea0dc 100644
--- a/ip/ipmroute.c
+++ b/ip/ipmroute.c
@@ -46,7 +46,7 @@ static void usage(void)
 	exit(-1);
 }
 
-struct rtfilter {
+static struct rtfilter {
 	int tb;
 	int af;
 	int iif;
-- 
2.20.1


             reply	other threads:[~2019-06-16 21:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-16 21:46 Michael Forney [this message]
2019-06-18 16:54 ` [PATCH] ipmroute: Prevent overlapping storage of `filter` global Stephen Hemminger

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=20190616214602.20546-1-mforney@mforney.org \
    --to=mforney@mforney.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).