]> git.baikalelectronics.ru Git - kernel.git/commit
ice: don't allow to run ice_send_event_to_aux() in atomic ctx
authorAlexander Lobakin <alexandr.lobakin@intel.com>
Wed, 23 Mar 2022 12:43:53 +0000 (13:43 +0100)
committerJakub Kicinski <kuba@kernel.org>
Wed, 23 Mar 2022 17:40:41 +0000 (10:40 -0700)
commitbb4c3a95653a1d8f7859c983358bc3261d05ea36
tree3bad49a37029667e33bfee2f30e9642d379576d1
parent46db60182c023d792e15fdf9d84fbb49481d1074
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: f316c8300c2f7 ("ice: Implement iidc operations")
Signed-off-by: Alexander Lobakin <alexandr.lobakin@intel.com>
Tested-by: Michal Kubiak <michal.kubiak@intel.com>
Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Acked-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/intel/ice/ice_idc.c