]> git.baikalelectronics.ru Git - kernel.git/commit
i40e: always propagate error value in i40e_set_vsi_promisc()
authorStefan Assmann <sassmann@kpanic.de>
Thu, 20 Aug 2020 11:53:12 +0000 (13:53 +0200)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Wed, 9 Sep 2020 22:06:24 +0000 (15:06 -0700)
commitd0eb63d30b881f98fd8c7445306a7a660fb91b23
tree30a9b1ebb79c1750ca25e3e4534b7ecaf53191c6
parenta159ddb5c271403d54a9ef067c57e9c3b2d328b9
i40e: always propagate error value in i40e_set_vsi_promisc()

The for loop in i40e_set_vsi_promisc() reports errors via dev_err() but
does not propagate the error up the call chain. Instead it continues the
loop and potentially overwrites the reported error value.
This results in the error being recorded in the log buffer, but the
caller might never know anything went the wrong way.

To avoid this situation i40e_set_vsi_promisc() needs to temporarily store
the error after reporting it. This is still not optimal as multiple
different errors may occur, so store the first error and hope that's
the main issue.

Fixes: c53334976124 (i40e: Remove scheduling while atomic possibility)
Reported-by: Michal Schmidt <mschmidt@redhat.com>
Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c