net/ice/base: fix null pointer dereference
authorQi Zhang <qi.z.zhang@intel.com>
Tue, 15 Dec 2020 04:42:46 +0000 (12:42 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 8 Jan 2021 15:03:06 +0000 (16:03 +0100)
commit09f918e8bc5131eb07d88e39c1e035716acf7d82
treed3cbada15fa3f4a3beb9b297da2bd00a7175929d
parent254f19c8c0616e8bf59a0d5cdfcd56cc2bfa69b3
net/ice/base: fix null pointer dereference

Added handling of allocation fault for ice_vsi_list_map_info
Should also check dereference of NULL pointer to filters VSI list
information for FWD_TO_VSI_LISt type only, otherwise, the FWD_TO_VSI type
filters by the given VSI can't be located.

Also the point *pi should not be NULL pointer, it is a reference to raw
data field, so remove this variable, use the reference directly.

Fixes: c7dd15931183 ("net/ice/base: add virtual switch code")
Cc: stable@dpdk.org
Signed-off-by: Jacek BuĊ‚atek <jacekx.bulatek@intel.com>
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
drivers/net/ice/base/ice_switch.c