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>] [day] [month] [year] [list]
Message-ID: <1422437446-31909-1-git-send-email-sdu.liu@huawei.com>
Date:	Wed, 28 Jan 2015 17:30:46 +0800
From:	Liu Hua <sdu.liu@...wei.com>
To:	<tglx@...utronix.de>, <marc.zyngier@....com>, <will.deacon@....com>
CC:	<peifeiyue@...wei.com>, <liusdu@....com>,
	<linux-kernel@...r.kernel.org>
Subject: [PATCH] irqchip: mark the irq status in handle_percpu_devid_irq

Function handle_percpu_devid_irq lacks of irq's state
changing. The handler may fail. So we should mark this
irq's status. It is very useful when we deploy kdump
and the handler fails with panic. The kdump can deal
with this situaton in machine_kexec_mask_interrupts,
which will do some works to the interrupt controller
(write EOI..).

Without this patch, kdump can not go through if first
kernel panics in per-cpu interrupt handler(like hrtimers).
I can reduce this bugs on ARM SMP platform with per cpu
timers.

I have send a related patchset. But I think that is not the
best way to solve this problem.

  link:lkml.org/lkml/2014/8/4/18

Signed-off-by: Liu Hua <sdu.liu@...wei.com>
---
 kernel/irq/chip.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index 6f1c7a5..3328a45 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -710,10 +710,18 @@ void handle_percpu_devid_irq(unsigned int irq, struct irq_desc *desc)
 	if (chip->irq_ack)
 		chip->irq_ack(&desc->irq_data);
 
+	raw_spin_lock(&desc->lock);
+	irqd_set(&desc->irq_data, IRQD_IRQ_INPROGRESS);
+	raw_spin_unlock(&desc->lock);
+
 	trace_irq_handler_entry(irq, action);
 	res = action->handler(irq, dev_id);
 	trace_irq_handler_exit(irq, action, res);
 
+	raw_spin_lock(&desc->lock);
+	irqd_clear(&desc->irq_data, IRQD_IRQ_INPROGRESS);
+	raw_spin_unlock(&desc->lock);
+
 	if (chip->irq_eoi)
 		chip->irq_eoi(&desc->irq_data);
 }
-- 
1.9.0

--
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