summaryrefslogtreecommitdiff
path: root/net/dsa/slave.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/dsa/slave.c')
-rw-r--r--net/dsa/slave.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index adcfb2cb4e61..9d9fef668eba 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -2413,6 +2413,7 @@ static void dsa_slave_switchdev_event_work(struct work_struct *work)
dp = dsa_to_port(ds, switchdev_work->port);
+ rtnl_lock();
switch (switchdev_work->event) {
case SWITCHDEV_FDB_ADD_TO_DEVICE:
if (switchdev_work->host_addr)
@@ -2447,6 +2448,7 @@ static void dsa_slave_switchdev_event_work(struct work_struct *work)
break;
}
+ rtnl_unlock();
dev_put(switchdev_work->dev);
kfree(switchdev_work);