lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 15 Aug 2014 09:45:19 +0100
From:	Sudeep Holla <sudeep.holla@....com>
To:	Neil Zhang <zhangwm@...vell.com>,
	"linux@....linux.org.uk" <linux@....linux.org.uk>
CC:	Sudeep Holla <sudeep.holla@....com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH] arm: irq: fix the affinity when migrate a irq

Hi Neil,

On 15/08/14 08:31, Neil Zhang wrote:
> Commit ffde1de64012 ("irqchip: Gic: Support forced affinity setting")
> has enable the forcing cpu affinity of interrupts for gic.
>
> The current code of migrate_one_irq will pass the current affinity mask
> to irq_set_affinity with force is true, it may select the cpu being
> offlined as the target CPU again, then the interrupt won't be migrated
> correctly.
>

I had posted similar patch [1] a while ago and the discussion[2] did not 
conclude. We need feedback from Thomas Gleixner.

Regards,
Sudeep

[1] 
http://lists.infradead.org/pipermail/linux-arm-kernel/2014-May/254838.html
[2] 
http://lists.infradead.org/pipermail/linux-arm-kernel/2014-June/265191.html

> Signed-off-by: Neil Zhang <zhangwm@...vell.com>
> ---
>   arch/arm/kernel/irq.c |    5 ++---
>   1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c
> index 2c42576..6f5a878 100644
> --- a/arch/arm/kernel/irq.c
> +++ b/arch/arm/kernel/irq.c
> @@ -167,11 +167,10 @@ static bool migrate_one_irq(struct irq_desc *desc)
>   	if (irqd_is_per_cpu(d) || !cpumask_test_cpu(smp_processor_id(), affinity))
>   		return false;
>
> -	if (cpumask_any_and(affinity, cpu_online_mask) >= nr_cpu_ids) {
> -		affinity = cpu_online_mask;
> +	if (cpumask_any_and(affinity, cpu_online_mask) >= nr_cpu_ids)
>   		ret = true;
> -	}
>
> +	affinity = cpu_online_mask;
>   	c = irq_data_get_irq_chip(d);
>   	if (!c->irq_set_affinity)
>   		pr_debug("IRQ%u: unable to set affinity\n", d->irq);
>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ