summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2021-10-26 17:07:36 +0300
committerDavid S. Miller <davem@davemloft.net>2021-10-26 17:07:36 +0300
commit656bcd5db804b1c66971c62934266226c0164040 (patch)
tree7eea5ffa9f1ddbd61af1a9554d15a73c0cde08bf
parent046178e726c2977d686ba5e07105d5a6685c830e (diff)
parent425d19cedef8f5ad5cff07ac545d51feec29733c (diff)
downloadlinux-656bcd5db804b1c66971c62934266226c0164040.tar.xz
Merge branch 'dsa-isolation-prep'
Vladimir Oltean says: ==================== DSA preparations for FDB isolation between bridges This series makes 2 small changes to DSA's SWITCHDEV_FDB_{ADD,DEL}_TO_DEVICE handler, which will make it possible to offer switch drivers a stable association between a FDB entry and a bridge device in a future series. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/dsa/port.c2
-rw-r--r--net/dsa/slave.c3
2 files changed, 2 insertions, 3 deletions
diff --git a/net/dsa/port.c b/net/dsa/port.c
index bf671306b560..c0e630f7f0bd 100644
--- a/net/dsa/port.c
+++ b/net/dsa/port.c
@@ -380,6 +380,8 @@ void dsa_port_pre_bridge_leave(struct dsa_port *dp, struct net_device *br)
switchdev_bridge_port_unoffload(brport_dev, dp,
&dsa_slave_switchdev_notifier,
&dsa_slave_switchdev_blocking_notifier);
+
+ dsa_flush_workqueue();
}
void dsa_port_bridge_leave(struct dsa_port *dp, struct net_device *br)
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index adcfb2cb4e61..dbda0e0fbffa 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -2448,7 +2448,6 @@ static void dsa_slave_switchdev_event_work(struct work_struct *work)
break;
}
- dev_put(switchdev_work->dev);
kfree(switchdev_work);
}
@@ -2521,8 +2520,6 @@ static int dsa_slave_fdb_event(struct net_device *dev,
switchdev_work->vid = fdb_info->vid;
switchdev_work->host_addr = host_addr;
- /* Hold a reference for dsa_fdb_offload_notify */
- dev_hold(dev);
dsa_schedule_work(&switchdev_work->work);
return 0;