Commit 262985fa authored by Ido Schimmel's avatar Ido Schimmel Committed by David S. Miller

bridge: mcast: Use spin_lock() instead of spin_lock_bh()

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: default avatarIdo Schimmel <idosch@nvidia.com>
Acked-by: default avatarNikolay Aleksandrov <razor@blackwall.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b526b2ea
...@@ -2669,7 +2669,7 @@ static int br_ip4_multicast_igmp3_report(struct net_bridge_mcast *brmctx, ...@@ -2669,7 +2669,7 @@ static int br_ip4_multicast_igmp3_report(struct net_bridge_mcast *brmctx,
if (!pmctx || igmpv2) if (!pmctx || igmpv2)
continue; continue;
spin_lock_bh(&brmctx->br->multicast_lock); spin_lock(&brmctx->br->multicast_lock);
if (!br_multicast_ctx_should_use(brmctx, pmctx)) if (!br_multicast_ctx_should_use(brmctx, pmctx))
goto unlock_continue; goto unlock_continue;
...@@ -2717,7 +2717,7 @@ static int br_ip4_multicast_igmp3_report(struct net_bridge_mcast *brmctx, ...@@ -2717,7 +2717,7 @@ static int br_ip4_multicast_igmp3_report(struct net_bridge_mcast *brmctx,
if (changed) if (changed)
br_mdb_notify(brmctx->br->dev, mdst, pg, RTM_NEWMDB); br_mdb_notify(brmctx->br->dev, mdst, pg, RTM_NEWMDB);
unlock_continue: unlock_continue:
spin_unlock_bh(&brmctx->br->multicast_lock); spin_unlock(&brmctx->br->multicast_lock);
} }
return err; return err;
...@@ -2807,7 +2807,7 @@ static int br_ip6_multicast_mld2_report(struct net_bridge_mcast *brmctx, ...@@ -2807,7 +2807,7 @@ static int br_ip6_multicast_mld2_report(struct net_bridge_mcast *brmctx,
if (!pmctx || mldv1) if (!pmctx || mldv1)
continue; continue;
spin_lock_bh(&brmctx->br->multicast_lock); spin_lock(&brmctx->br->multicast_lock);
if (!br_multicast_ctx_should_use(brmctx, pmctx)) if (!br_multicast_ctx_should_use(brmctx, pmctx))
goto unlock_continue; goto unlock_continue;
...@@ -2859,7 +2859,7 @@ static int br_ip6_multicast_mld2_report(struct net_bridge_mcast *brmctx, ...@@ -2859,7 +2859,7 @@ static int br_ip6_multicast_mld2_report(struct net_bridge_mcast *brmctx,
if (changed) if (changed)
br_mdb_notify(brmctx->br->dev, mdst, pg, RTM_NEWMDB); br_mdb_notify(brmctx->br->dev, mdst, pg, RTM_NEWMDB);
unlock_continue: unlock_continue:
spin_unlock_bh(&brmctx->br->multicast_lock); spin_unlock(&brmctx->br->multicast_lock);
} }
return err; return err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment