All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Mike Galbraith <efault@gmx.de>, RT <linux-rt-users@vger.kernel.org>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Subject: Re: [patch] Re: v5.15-rc2-rt3:  WARNING: CPU: 0 PID: 12 at ./include/linux/seqlock.h:271
Date: Sun, 26 Sep 2021 17:10:45 +0200	[thread overview]
Message-ID: <87zgrzbcei.ffs@tglx> (raw)
In-Reply-To: <a105fecc71d4b721d4e025e2caf2b13336b5d0fc.camel@gmx.de>

On Sun, Sep 26 2021 at 06:05, Mike Galbraith wrote:
> On Fri, 2021-09-24 at 07:22 +0200, Mike Galbraith wrote:
> --- a/net/bridge/br_multicast.c
> +++ b/net/bridge/br_multicast.c
> @@ -1679,10 +1679,14 @@ static void br_multicast_update_querier(
>  {
>  	lockdep_assert_held_once(&brmctx->br->multicast_lock);
>
> +	if (IS_ENABLED(CONFIG_PREEMPT_RT))
> +		preempt_disable();

That sequence count is protected by brmctx->br->multicast_lock, but
seqcount_init() does not associate the lock.

Untested below should cure it properly.

Thanks,

        tglx
---
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -1677,8 +1677,6 @@ static void br_multicast_update_querier(
 					int ifindex,
 					struct br_ip *saddr)
 {
-	lockdep_assert_held_once(&brmctx->br->multicast_lock);
-
 	write_seqcount_begin(&querier->seq);
 	querier->port_ifidx = ifindex;
 	memcpy(&querier->addr, saddr, sizeof(*saddr));
@@ -3867,13 +3865,13 @@ void br_multicast_ctx_init(struct net_br
 
 	brmctx->ip4_other_query.delay_time = 0;
 	brmctx->ip4_querier.port_ifidx = 0;
-	seqcount_init(&brmctx->ip4_querier.seq);
+	seqcount_spinlock_init(&brmctx->ip4_querier.seq, &br->multicast_lock);
 	brmctx->multicast_igmp_version = 2;
 #if IS_ENABLED(CONFIG_IPV6)
 	brmctx->multicast_mld_version = 1;
 	brmctx->ip6_other_query.delay_time = 0;
 	brmctx->ip6_querier.port_ifidx = 0;
-	seqcount_init(&brmctx->ip6_querier.seq);
+	seqcount_spinlock_init(&brmctx->ip6_querier.seq, &br->multicast_lock);
 #endif
 
 	timer_setup(&brmctx->ip4_mc_router_timer,
--- a/net/bridge/br_private.h
+++ b/net/bridge/br_private.h
@@ -82,7 +82,7 @@ struct bridge_mcast_other_query {
 struct bridge_mcast_querier {
 	struct br_ip addr;
 	int port_ifidx;
-	seqcount_t seq;
+	seqcount_spinlock_t seq;
 };
 
 /* IGMP/MLD statistics */

  reply	other threads:[~2021-09-26 15:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-22 21:00 [ANNOUNCE] v5.15-rc2-rt3 Sebastian Andrzej Siewior
2021-09-24  5:22 ` v5.15-rc2-rt3: WARNING: CPU: 0 PID: 12 at ./include/linux/seqlock.h:271 Mike Galbraith
2021-09-26  4:05   ` [patch] " Mike Galbraith
2021-09-26 15:10     ` Thomas Gleixner [this message]
2021-09-27  3:19       ` Mike Galbraith
2021-09-27  8:13         ` [PATCH] net: bridge: mcast: Associate the seqcount with its protecting lock Sebastian Andrzej Siewior

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=87zgrzbcei.ffs@tglx \
    --to=tglx@linutronix.de \
    --cc=bigeasy@linutronix.de \
    --cc=efault@gmx.de \
    --cc=linux-rt-users@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.