From 8033d2aef51722fe74068b52553625ed91ea256c Mon Sep 17 00:00:00 2001 From: Stanislav Fomichev Date: Wed, 12 Mar 2025 12:05:12 -0700 Subject: Revert "net: replace dev_addr_sem with netdev instance lock" This reverts commit df43d8bf10316a7c3b1e47e3cc0057a54df4a5b8. Cc: Kohei Enju Reviewed-by: Kuniyuki Iwashima Fixes: df43d8bf1031 ("net: replace dev_addr_sem with netdev instance lock") Signed-off-by: Stanislav Fomichev Link: https://patch.msgid.link/20250312190513.1252045-2-sdf@fomichev.me Tested-by: Lei Yang Signed-off-by: Paolo Abeni --- net/core/rtnetlink.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'net/core/rtnetlink.c') diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 90597bf84e3d..9355058bf996 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c @@ -3090,11 +3090,7 @@ static int do_setlink(const struct sk_buff *skb, struct net_device *dev, sa->sa_family = dev->type; memcpy(sa->sa_data, nla_data(tb[IFLA_ADDRESS]), dev->addr_len); - if (!netdev_need_ops_lock(dev)) - netdev_lock(dev); - err = netif_set_mac_address(dev, sa, extack); - if (!netdev_need_ops_lock(dev)) - netdev_unlock(dev); + err = netif_set_mac_address_user(dev, sa, extack); kfree(sa); if (err) goto errout; -- cgit