mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: Sasha Levin <sashal@kernel.org>
Cc: torvalds@linux-foundation.org, kuba@kernel.org,
	davem@davemloft.net, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [GIT PULL] Networking for v6.13-rc1
Date: Thu, 28 Nov 2024 17:01:05 +0100	[thread overview]
Message-ID: <29c9e4c9-9d94-41ee-96a3-990e65b2b47d@redhat.com> (raw)
In-Reply-To: <a4213a79-dd00-4d29-9215-97eb69f75f39@redhat.com>

On 11/28/24 16:46, Paolo Abeni wrote:
> On 11/28/24 15:48, Sasha Levin wrote:
>> On Thu, Nov 28, 2024 at 03:27:38PM +0100, Paolo Abeni wrote:
>>>      ipmr: add debug check for mr table cleanup
>>
>> When merging this PR into linus-next, I've noticed it introduced build
>> errors:
>>
>> /builds/linux/net/ipv4/ipmr.c:320:13: error: function 'ipmr_can_free_table' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration]
>>    320 | static bool ipmr_can_free_table(struct net *net)
>>        |             ^~~~~~~~~~~~~~~~~~~
>> 1 error generated.
>>
>> The commit in question isn't in linux-next and seems to be broken.
> 
> My fault, I'm sorry.
> 
> I can't reproduce the issue here. 

I see it now. It's clang with CONFIG_DEBUG_NET=n. Apparently clang is
too smart with BUILD_BUG_ON_INVALID().

A trivial fix would be:
---
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
index 383ea8b91cc7..c5b8ec5c0a8c 100644
--- a/net/ipv4/ipmr.c
+++ b/net/ipv4/ipmr.c
@@ -437,7 +437,7 @@ static void ipmr_free_table(struct mr_table *mrt)
 {
 	struct net *net = read_pnet(&mrt->net);

-	DEBUG_NET_WARN_ON_ONCE(!ipmr_can_free_table(net));
+	WARN_ON_ONCE(!ipmr_can_free_table(net));

 	timer_shutdown_sync(&mrt->ipmr_expire_timer);
 	mroute_clean_tables(mrt, MRT_FLUSH_VIFS | MRT_FLUSH_VIFS_STATIC |
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c
index 4147890fe98f..7f1902ac3586 100644
--- a/net/ipv6/ip6mr.c
+++ b/net/ipv6/ip6mr.c
@@ -416,7 +416,7 @@ static void ip6mr_free_table(struct mr_table *mrt)
 {
 	struct net *net = read_pnet(&mrt->net);

-	DEBUG_NET_WARN_ON_ONCE(!ip6mr_can_free_table(net));
+	WARN_ON_ONCE(!ip6mr_can_free_table(net));

 	timer_shutdown_sync(&mrt->ipmr_expire_timer);
 	mroute_clean_tables(mrt, MRT6_FLUSH_MIFS | MRT6_FLUSH_MIFS_STATIC |


  reply	other threads:[~2024-11-28 16:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-28 14:27 Paolo Abeni
2024-11-28 14:48 ` Sasha Levin
2024-11-28 15:46   ` Paolo Abeni
2024-11-28 16:01     ` Paolo Abeni [this message]
2024-11-28 16:06     ` Sasha Levin
2024-11-28 19:19 ` pr-tracker-bot
2024-11-29  5:38 ` patchwork-bot+netdevbpf

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=29c9e4c9-9d94-41ee-96a3-990e65b2b47d@redhat.com \
    --to=pabeni@redhat.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sashal@kernel.org \
    --cc=torvalds@linux-foundation.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

all inboxes | Powered by JetHome®