]> git.baikalelectronics.ru Git - kernel.git/commit
firewire: don't write directly to netdev->dev_addr
authorJakub Kicinski <kuba@kernel.org>
Tue, 26 Oct 2021 17:53:52 +0000 (10:53 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 28 Oct 2021 11:47:09 +0000 (12:47 +0100)
commitd90a62950f0962c5398689007c84d13c8d371d29
tree11982a2d6ae5520a2c41bb2a757c2e2466d0a44f
parenta5ece72db71d9c97cd3d6a1eaf9980c0330ae3b6
firewire: don't write directly to netdev->dev_addr

Commit 0e59850f1b49 ("net-next: When a bond have a massive amount
of VLANs...") introduced a rbtree for faster Ethernet address look
up. To maintain netdev->dev_addr in this tree we need to make all
the writes to it go through appropriate helpers.

Prepare fwnet_hwaddr on the stack and use dev_addr_set() to copy
it to netdev->dev_addr. We no longer need to worry about alignment.
union fwnet_hwaddr does not have any padding and we set all fields
so we don't need to zero it upfront.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/firewire/net.c