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 <[email protected]>
Acked-by: Scott Feldman <[email protected]>
Reviewed-by: John Fastabend <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
Jiri Pirko 2015-10-14 19:40:51 +02:00 • committed by David S. Miller
commit 850d0cbc91
5 changed files with 15 additions and 13 deletions

View file

@ -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;