Re: [PATCH] Revert "net/ncsi: change from ndo_set_mac_address to dev_set_mac_address"
From: Andrew Lunn
Date: Fri Nov 29 2024 - 10:55:17 EST
On Fri, Nov 29, 2024 at 05:12:56PM +0800, Potin Lai wrote:
> From: Potin Lai <potin.lai@xxxxxxxxxxxx>
>
> This reverts commit 790071347a0a1a89e618eedcd51c687ea783aeb3.
>
> We are seeing kernel panic when enabling two NCSI interfaces at same
> time. It looks like mutex lock is being used in softirq caused the
> issue.
So a revert does make sense, you are seeing a real problem from that
commit.
However with the revert, is the code actually correct? Or is it
missing some locking? Normally dev_addr_sem is used to protect against
two calls to change the MAC address at once. Is this protection
needed? It would also be typical to hold RTNL while changing the MAC
address. So it would be nice to see an analysis of the locking, and
maybe the revert commit message says this gets you from a broken state
to a less broken state, and the real fix will be submitted soon?
Andrew