diff options
author | Jiri Pirko <jiri@mellanox.com> | 2020-05-21 15:11:44 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-05-22 16:08:14 -0700 |
commit | 4340f42f207eacb81e7a6b6bb1e3b6afad9a2e26 (patch) | |
tree | 605361b0e9f273e1eea08b80644a631665c27c34 /drivers/xen | |
parent | a96ac8a0045e3cbe3e5af6d1b3c78c6c2065dec5 (diff) | |
download | linux-4340f42f207eacb81e7a6b6bb1e3b6afad9a2e26.tar.bz2 |
mlxsw: spectrum: Fix use-after-free of split/unsplit/type_set in case reload fails
In case of reload fail, the mlxsw_sp->ports contains a pointer to a
freed memory (either by reload_down() or reload_up() error path).
Fix this by initializing the pointer to NULL and checking it before
dereferencing in split/unsplit/type_set callpaths.
Fixes: 24cc68ad6c46 ("mlxsw: core: Add support for reload")
Reported-by: Danielle Ratson <danieller@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/xen')
0 files changed, 0 insertions, 0 deletions