]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
ice: Don't use GFP_KERNEL in atomic context
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 16 Jan 2022 18:46:20 +0000 (19:46 +0100)
committerPaolo Pisati <paolo.pisati@canonical.com>
Wed, 23 Mar 2022 10:49:01 +0000 (11:49 +0100)
BugLink: https://bugs.launchpad.net/bugs/1966056
[ 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 <christophe.jaillet@wanadoo.fr>
Tested-by: Leszek Kaliszczuk <leszek.kaliszczuk@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/net/ethernet/intel/ice/ice_main.c

index d6ee62ae448022403896c8c8dc5f2fd81cf75197..137a054dd1e3189aada4ac5c7b0f0f8e6ecc77b9 100644 (file)
@@ -2874,7 +2874,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 */