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: <20221006192856.2546702-1-echanude@redhat.com>
Date:   Thu,  6 Oct 2022 15:28:56 -0400
From:   Eric Chanudet <echanude@...hat.com>
To:     Andy Gross <agross@...nel.org>,
        Bjorn Andersson <andersson@...nel.org>,
        Konrad Dybcio <konrad.dybcio@...ainline.org>,
        Manivannan Sadhasivam <mani@...nel.org>,
        Jassi Brar <jassisinghbrar@...il.com>,
        Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc:     linux-arm-msm@...r.kernel.org, linux-rt-users@...r.kernel.org,
        linux-kernel@...r.kernel.org, Eric Chanudet <echanude@...hat.com>
Subject: [PATCH v2] mailbox: qcom-ipcc: flag IRQ NO_THREAD

PREEMPT_RT forces qcom-ipcc's handler to be threaded with interrupts
enabled, which triggers a warning in __handle_irq_event_percpu():
    irq 173 handler irq_default_primary_handler+0x0/0x10 enabled interrupts
    WARNING: CPU: 0 PID: 77 at kernel/irq/handle.c:161 __handle_irq_event_percpu+0x4c4/0x4d0

Mark it IRQF_NO_THREAD. This is an IRQ-multiplexer and as such it should
not be threaded, otherwise its child-interrupts would be invoked from
the thread handler which is not desired.

This is noticed by PREEMPT_RT, but also on a non-PREEMPT_RT kernel where
`threadirqs' has been used.

Acked-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Signed-off-by: Eric Chanudet <echanude@...hat.com>
---
Changes since v1:
- Reformulate the patch description using Sebastian's response.

v1 can be found at
https://lore.kernel.org/linux-arm-msm/20221003170849.383005-1-echanude@redhat.com/

 drivers/mailbox/qcom-ipcc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/mailbox/qcom-ipcc.c b/drivers/mailbox/qcom-ipcc.c
index 31d58b7d55fe..7e27acf6c0cc 100644
--- a/drivers/mailbox/qcom-ipcc.c
+++ b/drivers/mailbox/qcom-ipcc.c
@@ -308,7 +308,8 @@ static int qcom_ipcc_probe(struct platform_device *pdev)
 		goto err_mbox;
 
 	ret = devm_request_irq(&pdev->dev, ipcc->irq, qcom_ipcc_irq_fn,
-			       IRQF_TRIGGER_HIGH | IRQF_NO_SUSPEND, name, ipcc);
+			       IRQF_TRIGGER_HIGH | IRQF_NO_SUSPEND |
+			       IRQF_NO_THREAD, name, ipcc);
 	if (ret < 0) {
 		dev_err(&pdev->dev, "Failed to register the irq: %d\n", ret);
 		goto err_req_irq;
-- 
2.37.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ