From: Christophe JAILLET Date: Sun, 16 Jan 2022 18:46:20 +0000 (+0100) Subject: ice: Don't use GFP_KERNEL in atomic context X-Git-Tag: v5.16.15~86 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=40e8acfdcd271d8d0a321564c3c50cf10cc995b9;p=thirdparty%2Fkernel%2Fstable.git ice: Don't use GFP_KERNEL in atomic context [ Upstream commit 3d97f1afd8d831e0c0dc1157418f94b8faa97b54 ] ice_misc_intr() is an irq handler. It should not sleep. Use GFP_ATOMIC instead of GFP_KERNEL when allocating some memory. Fixes: 348048e724a0 ("ice: Implement iidc operations") Signed-off-by: Christophe JAILLET Tested-by: Leszek Kaliszczuk Signed-off-by: Tony Nguyen Signed-off-by: Sasha Levin --- diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c index fc04b4cf4ae0a..676e837d48cfc 100644 --- a/drivers/net/ethernet/intel/ice/ice_main.c +++ b/drivers/net/ethernet/intel/ice/ice_main.c @@ -3016,7 +3016,7 @@ static irqreturn_t ice_misc_intr(int __always_unused irq, void *data) struct iidc_event *event; ena_mask &= ~ICE_AUX_CRIT_ERR; - event = kzalloc(sizeof(*event), GFP_KERNEL); + event = kzalloc(sizeof(*event), GFP_ATOMIC); if (event) { set_bit(IIDC_EVENT_CRIT_ERR, event->type); /* report the entire OICR value to AUX driver */