Skip to content
Commit 2d78e2d3 authored by Stefan Assmann's avatar Stefan Assmann Committed by Greg Kroah-Hartman
Browse files

i40e: always propagate error value in i40e_set_vsi_promisc()

[ Upstream commit b6f23d38 ]

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: 37d318d7

 (i40e: Remove scheduling while atomic possibility)
Reported-by: default avatarMichal Schmidt <mschmidt@redhat.com>
Signed-off-by: default avatarStefan Assmann <sassmann@kpanic.de>
Tested-by: default avatarAaron Brown <aaron.f.brown@intel.com>
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 8ed4b5d7
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment