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] [day] [month] [year] [list]
Message-ID: <165823894877.15455.10845543417521952692.tip-bot2@tip-bot2>
Date:   Tue, 19 Jul 2022 13:55:48 -0000
From:   "irqchip-bot for Xu Qiang" <tip-bot2@...utronix.de>
To:     linux-kernel@...r.kernel.org
Cc:     Xu Qiang <xuqiang36@...wei.com>, Marc Zyngier <maz@...nel.org>,
        tglx@...utronix.de
Subject: [irqchip: irq/irqchip-next] irqdomain: Report irq number for NOMAP domains

The following commit has been merged into the irq/irqchip-next branch of irqchip:

Commit-ID:     6f194c99f466147148cc08452718b46664112548
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/6f194c99f466147148cc08452718b46664112548
Author:        Xu Qiang <xuqiang36@...wei.com>
AuthorDate:    Tue, 19 Jul 2022 06:36:40 
Committer:     Marc Zyngier <maz@...nel.org>
CommitterDate: Tue, 19 Jul 2022 14:51:13 +01:00

irqdomain: Report irq number for NOMAP domains

When using a NOMAP domain, __irq_resolve_mapping() doesn't store
the Linux IRQ number at the address optionally provided by the caller.
While this isn't a huge deal (the returned value is guaranteed
to the hwirq that was passed as a parameter), let's honour the letter
of the API by writing the expected value.

Fixes: d22558dd0a6c (“irqdomain: Introduce irq_resolve_mapping()”)
Signed-off-by: Xu Qiang <xuqiang36@...wei.com>
[maz: commit message]
Signed-off-by: Marc Zyngier <maz@...nel.org>
Link: https://lore.kernel.org/r/20220719063641.56541-2-xuqiang36@huawei.com
---
 kernel/irq/irqdomain.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index d5ce965..481abb8 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -910,6 +910,8 @@ struct irq_desc *__irq_resolve_mapping(struct irq_domain *domain,
 			data = irq_domain_get_irq_data(domain, hwirq);
 			if (data && data->hwirq == hwirq)
 				desc = irq_data_to_desc(data);
+			if (irq && desc)
+				*irq = hwirq;
 		}
 
 		return desc;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ