Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ACPI: acpi_pci_link_set() can allocate with either GFP_ATOMIC or GFP_KERNEL

acpi_pci_link_set() allocates both with interrupts on
and with interrupts off (resume-time), so check interrupts
and decide on GFP_ATOMIC or GFP_KERNEL at run-time.

Signed-off-by: Jiri Kosina <jikos@jikos.cz>
Signed-off-by: Len Brown <len.brown@intel.com>

authored by

Jiri Kosina and committed by
Len Brown
168a328f 786f18c6

+1 -1
+1 -1
drivers/acpi/pci_link.c
··· 307 307 if (!link || !irq) 308 308 return -EINVAL; 309 309 310 - resource = kmalloc(sizeof(*resource) + 1, GFP_ATOMIC); 310 + resource = kmalloc(sizeof(*resource) + 1, irqs_disabled() ? GFP_ATOMIC: GFP_KERNEL); 311 311 if (!resource) 312 312 return -ENOMEM; 313 313