net/bnxt: fix checking VNIC in shutdown path
authorSomnath Kotur <somnath.kotur@broadcom.com>
Fri, 11 Sep 2020 01:56:02 +0000 (18:56 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 18 Sep 2020 16:55:12 +0000 (18:55 +0200)
commit4b029f02de3a0ce9cdd9a3475b84ca2e42d74281
treea2e1aae311d5f670c64fb93f0d709dcd40342c3b
parent6c7cbc8077dd25abd6baf264cd598252ecd9fb3b
net/bnxt: fix checking VNIC in shutdown path

Add a couple of NULL pointer checks in bnxt_free_all_filters()
and bnxt_free_vnics() respectively to guard against certain error
injection/recovery scenarios where it was found that the application
was crashing with the bp->vnic_info pointer being NULL.

Fixes: 51fafb89a9a0 ("net/bnxt: get rid of ff pools and use VNIC info array")
Cc: stable@dpdk.org
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt_filter.c
drivers/net/bnxt/bnxt_vnic.c