diff options
author | Ivan Vecera <ivecera@redhat.com> | 2022-04-01 12:40:52 +0200 |
---|---|---|
committer | Tony Nguyen <anthony.l.nguyen@intel.com> | 2022-04-26 18:26:33 +0200 |
commit | aaf461af729b81dbb19ec33abe6da74702b352d2 (patch) | |
tree | 3e5deb8abf9b6b474e42cafa672843e285f2d366 /drivers/clocksource | |
parent | virtio_net: fix wrong buf address calculation when using xdp (diff) | |
download | linux-aaf461af729b81dbb19ec33abe6da74702b352d2.tar.xz linux-aaf461af729b81dbb19ec33abe6da74702b352d2.zip |
ice: Fix incorrect locking in ice_vc_process_vf_msg()
Usage of mutex_trylock() in ice_vc_process_vf_msg() is incorrect
because message sent from VF is ignored and never processed.
Use mutex_lock() instead to fix the issue. It is safe because this
mutex is used to prevent races between VF related NDOs and
handlers processing request messages from VF and these handlers
are running in ice_service_task() context. Additionally move this
mutex lock prior ice_vc_is_opcode_allowed() call to avoid potential
races during allowlist access.
Fixes: e6ba5273d4ed ("ice: Fix race conditions between virtchnl handling and VF ndo ops")
Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Diffstat (limited to 'drivers/clocksource')
0 files changed, 0 insertions, 0 deletions