Commit 5a315693 authored by Alexander Lobakin's avatar Alexander Lobakin Committed by Jakub Kicinski

ice: don't allow to run ice_send_event_to_aux() in atomic ctx

ice_send_event_to_aux() eventually descends to mutex_lock()
(-> might_sched()), so it must not be called under non-task
context. However, at least two fixes have happened already for the
bug splats occurred due to this function being called from atomic
context.
To make the emergency landings softer, bail out early when executed
in non-task context emitting a warn splat only once. This way we
trade some events being potentially lost for system stability and
avoid any related hangs and crashes.

Fixes: 348048e7 ("ice: Implement iidc operations")
Signed-off-by: default avatarAlexander Lobakin <alexandr.lobakin@intel.com>
Tested-by: default avatarMichal Kubiak <michal.kubiak@intel.com>
Reviewed-by: default avatarMaciej Fijalkowski <maciej.fijalkowski@intel.com>
Acked-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 32d53c0a
......@@ -34,6 +34,9 @@ void ice_send_event_to_aux(struct ice_pf *pf, struct iidc_event *event)
{
struct iidc_auxiliary_drv *iadrv;
if (WARN_ON_ONCE(!in_task()))
return;
if (!pf->adev)
return;
......
Markdown is supported
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