]> git.itanic.dy.fi Git - linux-stable/commit
i40e: fix potential NULL pointer dereferencing of pf->vf i40e_sync_vsi_filters()
authorAndrii Staikov <andrii.staikov@intel.com>
Tue, 22 Aug 2023 22:16:53 +0000 (15:16 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 23 Aug 2023 10:48:04 +0000 (11:48 +0100)
commit9525a3c38accd2e186f52443e35e633e296cc7f5
tree9acf78a37e52e8a371dd62288d8fd98b1168ef25
parentda71714e359b64bd7aab3bd56ec53f307f058133
i40e: fix potential NULL pointer dereferencing of pf->vf i40e_sync_vsi_filters()

Add check for pf->vf not being NULL before dereferencing
pf->vf[vsi->vf_id] in updating VSI filter sync.
Add a similar check before dereferencing !pf->vf[vsi->vf_id].trusted
in the condition for clearing promisc mode bit.

Fixes: c87c938f62d8 ("i40e: Add VF VLAN pruning")
Signed-off-by: Andrii Staikov <andrii.staikov@intel.com>
Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Tested-by: Rafal Romanowski <rafal.romanowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/intel/i40e/i40e_main.c