Patch "ice: don't allow to run ice_send_event_to_aux() in atomic ctx" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

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

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     ice-don-t-allow-to-run-ice_send_event_to_aux-in-atom.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit a38009bec61c391c57f5012b4ecc3c29f3b9b28c
Author: Alexander Lobakin <alexandr.lobakin@xxxxxxxxx>
Date:   Wed Mar 23 13:43:53 2022 +0100

    ice: don't allow to run ice_send_event_to_aux() in atomic ctx
    
    [ Upstream commit 5a3156932da06f09953764de113419f254086faf ]
    
    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: 348048e724a0e ("ice: Implement iidc operations")
    Signed-off-by: Alexander Lobakin <alexandr.lobakin@xxxxxxxxx>
    Tested-by: Michal Kubiak <michal.kubiak@xxxxxxxxx>
    Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@xxxxxxxxx>
    Acked-by: Tony Nguyen <anthony.l.nguyen@xxxxxxxxx>
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/intel/ice/ice_idc.c b/drivers/net/ethernet/intel/ice/ice_idc.c
index adcc9a251595..a2714988dd96 100644
--- a/drivers/net/ethernet/intel/ice/ice_idc.c
+++ b/drivers/net/ethernet/intel/ice/ice_idc.c
@@ -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;
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux