diff options
author | Jiri Pirko <jiri@mellanox.com> | 2015-10-14 19:40:51 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-10-15 06:09:49 -0700 |
commit | 850d0cbc9171f63f0418afffb0d89a84db927851 (patch) | |
tree | 21ecd5e1adb0d14f8c455484d57795d0a86379ea /net/dsa | |
parent | 0bc05d585d381c30de3fdf955730df31593d2101 (diff) | |
download | op-kernel-dev-850d0cbc9171f63f0418afffb0d89a84db927851.zip op-kernel-dev-850d0cbc9171f63f0418afffb0d89a84db927851.tar.gz |
switchdev: remove pointers from switchdev objects
When object is used in deferred work, we cannot use pointers in
switchdev object structures because the memory they point at may be already
used by someone else. So rather do local copy of the value.
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Acked-by: Scott Feldman <sfeldma@gmail.com>
Reviewed-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa')
-rw-r--r-- | net/dsa/slave.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/dsa/slave.c b/net/dsa/slave.c index 84cd863..b0b8da0 100644 --- a/net/dsa/slave.c +++ b/net/dsa/slave.c @@ -393,7 +393,7 @@ static int dsa_slave_port_fdb_dump(struct net_device *dev, if (ret < 0) break; - fdb->addr = addr; + ether_addr_copy(fdb->addr, addr); fdb->vid = vid; fdb->ndm_state = is_static ? NUD_NOARP : NUD_REACHABLE; |