etherdevice: use __dev_addr_set()
Subsystems (2)
Jakub Kicinski
maintainerPATCH 1/1 etherdevice: use __dev_addr_set()
Andrew points out that eth_hw_addr_set() replaces memcpy() calls so we can't use ether_addr_copy() which assumes both arguments are 2-bytes aligned.
Reported-by Andrew Lunn <[email protected]>
Signed-off-by Jakub Kicinski <[email protected]>
--- include/linux/etherdevice.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/etherdevice.h +1 -1
@@ -308,7 +308,7 @@ static inline void ether_addr_copy(u8 *dst, const u8 *src)*/ static inline void eth_hw_addr_set (struct net_device *dev,const u8 *addr) { -ether_addr_copy (dev->dev_addr, addr); +__dev_addr_set (dev, addr,ETH_ALEN ); }/**
Signature · 1 line
2.31.1
This patch was applied to netdev/net.git (refs/heads/master):
Hello:
This patch was applied to netdev/net.git (refs/heads/master):
Quoted 8 lines · On Mon, 4 Oct 2021 16:01:40 -0700 you wrote:
Andrew points out that
eth_hw_addr_set()replacesmemcpy()calls so we can't useether_addr_copy()which assumes both arguments are 2-bytes aligned.Reported-by Andrew Lunn <[email protected]>Signed-off-by Jakub Kicinski <[email protected]>[...]
Here is the summary with links:
- [net] etherdevice: use __dev_addr_set()
https://git.kernel.org/netdev/net/c/3f6cffb8604b
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html