net/mlx5e: Read neigh parameters with proper locking
authorHadar Hen Zion <hadarh@mellanox.com>
Thu, 2 Feb 2017 14:14:21 +0000 (16:14 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Sun, 30 Apr 2017 13:03:10 +0000 (16:03 +0300)
commit033354d501862ca1f58caa1e5c5775712e1bff17
treeb66701bf6c4aea022d424c6a48c6bac9efc950f4
parent0b67a38fe699ee60c56d193d33c9c7392cabaea7
net/mlx5e: Read neigh parameters with proper locking

The nud_state and hardware address fields are protected by the neighbour
lock, we should acquire it before accessing those parameters.

Use this lock to avoid inconsistency between the neighbour validity state
and it's hardware address.

Signed-off-by: Hadar Hen Zion <hadarh@mellanox.com>
Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c