lkml.org 
[lkml]   [2018]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] kernel: x86: apic: Replace GFP_ATOMIC with GFP_KERNEL in __add_pin_to_irq_node

* Jia-Ju Bai <baijiaju1990@gmail.com> wrote:

> The function __add_pin_to_irq_node is not called in atomic context.
> Thus GFP_ATOMIC is not necessary, and it can be replaced with GFP_KERNEL.
>
> Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
> ---
> arch/x86/kernel/apic/io_apic.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
> index 201579d..665c013 100644
> --- a/arch/x86/kernel/apic/io_apic.c
> +++ b/arch/x86/kernel/apic/io_apic.c
> @@ -379,7 +379,7 @@ static int __add_pin_to_irq_node(struct mp_chip_data *data,
> if (entry->apic == apic && entry->pin == pin)
> return 0;
>
> - entry = kzalloc_node(sizeof(struct irq_pin_list), GFP_ATOMIC, node);
> + entry = kzalloc_node(sizeof(struct irq_pin_list), GFP_KERNEL, node);
> if (!entry) {
> pr_err("can not alloc irq_pin_list (%d,%d,%d)\n",
> node, apic, pin);

NAK: this is called in an atomic section: with IRQs disabled ...

Thanks,

Ingo

\
 
 \ /
  Last update: 2018-02-13 16:57    [W:0.048 / U:14.536 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site