提交 168a328f 编写于 作者: J Jiri Kosina 提交者: Len Brown

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: NJiri Kosina <jikos@jikos.cz>
Signed-off-by: NLen Brown <len.brown@intel.com>
上级 786f18c6
......@@ -307,7 +307,7 @@ static int acpi_pci_link_set(struct acpi_pci_link *link, int irq)
if (!link || !irq)
return -EINVAL;
resource = kmalloc(sizeof(*resource) + 1, GFP_ATOMIC);
resource = kmalloc(sizeof(*resource) + 1, irqs_disabled() ? GFP_ATOMIC: GFP_KERNEL);
if (!resource)
return -ENOMEM;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册