Skip to content

Commit

Permalink
bridge: mcast: Use spin_lock() instead of spin_lock_bh()
Browse files Browse the repository at this point in the history
IGMPv3 / MLDv2 Membership Reports are only processed from the data path
with softIRQ disabled, so there is no need to call spin_lock_bh(). Use
spin_lock() instead.

This is consistent with how other IGMP / MLD packets are processed.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Acked-by: Nikolay Aleksandrov <razor@blackwall.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Ido Schimmel authored and David S. Miller committed Oct 19, 2022
1 parent b526b2e commit 262985f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions net/bridge/br_multicast.c
Original file line number Diff line number Diff line change
Expand Up @@ -2669,7 +2669,7 @@ static int br_ip4_multicast_igmp3_report(struct net_bridge_mcast *brmctx,
if (!pmctx || igmpv2)
continue;

spin_lock_bh(&brmctx->br->multicast_lock);
spin_lock(&brmctx->br->multicast_lock);
if (!br_multicast_ctx_should_use(brmctx, pmctx))
goto unlock_continue;

Expand Down Expand Up @@ -2717,7 +2717,7 @@ static int br_ip4_multicast_igmp3_report(struct net_bridge_mcast *brmctx,
if (changed)
br_mdb_notify(brmctx->br->dev, mdst, pg, RTM_NEWMDB);
unlock_continue:
spin_unlock_bh(&brmctx->br->multicast_lock);
spin_unlock(&brmctx->br->multicast_lock);
}

return err;
Expand Down Expand Up @@ -2807,7 +2807,7 @@ static int br_ip6_multicast_mld2_report(struct net_bridge_mcast *brmctx,
if (!pmctx || mldv1)
continue;

spin_lock_bh(&brmctx->br->multicast_lock);
spin_lock(&brmctx->br->multicast_lock);
if (!br_multicast_ctx_should_use(brmctx, pmctx))
goto unlock_continue;

Expand Down Expand Up @@ -2859,7 +2859,7 @@ static int br_ip6_multicast_mld2_report(struct net_bridge_mcast *brmctx,
if (changed)
br_mdb_notify(brmctx->br->dev, mdst, pg, RTM_NEWMDB);
unlock_continue:
spin_unlock_bh(&brmctx->br->multicast_lock);
spin_unlock(&brmctx->br->multicast_lock);
}

return err;
Expand Down

0 comments on commit 262985f

Please sign in to comment.