aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
authorJiri Pirko <jiri@mellanox.com>2016-11-10 12:31:04 +0100
committerDavid S. Miller <davem@davemloft.net>2016-11-10 13:02:15 -0500
commit33b1341cd1bf5c89e7ef332aa8ac3ed614a3d942 (patch)
tree516ea68da5d5e948bf32aeb098a72e2042165470 /net/unix/af_unix.c
parentMerge branch 'qed-fixes' (diff)
downloadwireguard-linux-33b1341cd1bf5c89e7ef332aa8ac3ed614a3d942.tar.xz
wireguard-linux-33b1341cd1bf5c89e7ef332aa8ac3ed614a3d942.zip
mlxsw: spectrum_router: Fix handling of neighbour structure
__neigh_create function works in a different way than assumed. It passes "n" as a parameter to ndo_neigh_construct. But this "n" might be destroyed right away before __neigh_create() returns in case there is already another neighbour struct in the hashtable with the same dev and primary key. That is not expected by mlxsw_sp_router_neigh_construct() and the stored "n" points to freed memory, eventually leading to crash. Fix this by doing tight 1:1 coupling between neighbour struct and internal driver neigh_entry. That allows to narrow down the key in internal driver hashtable to do lookups by "n" only. Fixes: 6cf3c971dc84 ("mlxsw: spectrum_router: Add private neigh table") Signed-off-by: Jiri Pirko <jiri@mellanox.com> Acked-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions