]> git.baikalelectronics.ru Git - kernel.git/commit
ice: Stop processing VF messages during teardown
authorAnirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Wed, 4 Aug 2021 19:12:42 +0000 (12:12 -0700)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Mon, 9 Aug 2021 16:59:23 +0000 (09:59 -0700)
commit58d695dbabc8d52ed44e9f4bf9ea5ae2dc5ab48b
treef9f9564201fa0b8e52d22e417c8afffb588183d3
parentd9bd6af1dd8e72a580992656cc5829d55ed86401
ice: Stop processing VF messages during teardown

When VFs are setup and torn down in quick succession, it is possible
that a VF is torn down by the PF while the VF's virtchnl requests are
still in the PF's mailbox ring. Processing the VF's virtchnl request
when the VF itself doesn't exist results in undefined behavior. Fix
this by adding a check to stop processing virtchnl requests when VF
teardown is in progress.

Fixes: 89b2e35fc619 ("ice: Add handler to configure SR-IOV")
Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice.h
drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c