* FAILED: patch "[PATCH] backlight: lm3630a: Cancel delayed work before destroying" failed to apply to 5.10-stable tree
@ 2026-11-03 10:13 gregkh
2026-11-03 15:16 ` [PATCH 5.10.y 1/2] backlight: lm3630a_bl: Remove redundant 'flush_workqueue()' calls Sasha Levin
0 siblings, 1 reply; 3+ messages in thread
From: gregkh @ 2026-11-03 10:13 UTC (permalink / raw)
To: mhun512, ae878000, danielt, lee; +Cc: stable
The patch below does not apply to the 5.10-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.10.y
git checkout FETCH_HEAD
git cherry-pick -x 2cf184caab8b406fdd9db126ee40d62418237456
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable@vger.kernel.org>' --in-reply-to '2026110359-varsity-prefix-2813@gregkh' --subject-prefix 'PATCH 5.10.y' 'HEAD^..'
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 2cf184caab8b406fdd9db126ee40d62418237456 Mon Sep 17 00:00:00 2001
From: Myeonghun Pak <mhun512@gmail.com>
Date: Fri, 2 Oct 2026 23:04:39 -0400
Subject: [PATCH] backlight: lm3630a: Cancel delayed work before destroying
workqueue
The interrupt handler queues delayed work to read the interrupt status.
After free_irq() stops the producer, this work can still be waiting on its
timer. destroy_workqueue() cannot drain delayed work that has not yet been
queued by its timer, so the timer can outlive both the workqueue and the
devm-allocated chip containing the work.
Cancel the delayed work synchronously after freeing the IRQ and before
destroying the workqueue. This also waits for any running status read to
finish before the chip's resources are released.
This issue was identified during our ongoing static-analysis research
while reviewing kernel code.
Fixes: 0c2a665a648e ("backlight: add Backlight driver for lm3630 chip")
Cc: stable@vger.kernel.org
Assisted-by: LLM
Co-developed-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Myeonghun Pak <mhun512@gmail.com>
Reviewed-by: Daniel Thompson (RISCstar) <danielt@kernel.org>
Link: https://patch.msgid.link/20261003030439.599330-1-mhun512@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
diff --git a/drivers/video/backlight/lm3630a_bl.c b/drivers/video/backlight/lm3630a_bl.c
index 8f49e59ce374..8ef8163c7fef 100644
--- a/drivers/video/backlight/lm3630a_bl.c
+++ b/drivers/video/backlight/lm3630a_bl.c
@@ -591,6 +591,7 @@ static void lm3630a_remove(struct i2c_client *client)
if (pchip->irq) {
free_irq(pchip->irq, pchip);
+ cancel_delayed_work_sync(&pchip->work);
destroy_workqueue(pchip->irqthread);
}
}
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH 5.10.y 1/2] backlight: lm3630a_bl: Remove redundant 'flush_workqueue()' calls
2026-11-03 10:13 FAILED: patch "[PATCH] backlight: lm3630a: Cancel delayed work before destroying" failed to apply to 5.10-stable tree gregkh
@ 2026-11-03 15:16 ` Sasha Levin
2026-11-03 15:16 ` [PATCH 5.10.y 2/2] backlight: lm3630a: Cancel delayed work before destroying workqueue Sasha Levin
0 siblings, 1 reply; 3+ messages in thread
From: Sasha Levin @ 2026-11-03 15:16 UTC (permalink / raw)
To: stable; +Cc: Xu Wang, Daniel Thompson, Helge Deller, Sasha Levin
From: Xu Wang <vulab@iscas.ac.cn>
[ Upstream commit adc122011125682932ef279d717153670feedde4 ]
'destroy_workqueue()' already drains the queue before destroying it, so
there is no need to flush it explicitly.
Remove the redundant 'flush_workqueue()' calls.
Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Helge Deller <deller@gmx.de>
Stable-dep-of: 2cf184caab8b ("backlight: lm3630a: Cancel delayed work before destroying workqueue")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/video/backlight/lm3630a_bl.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/video/backlight/lm3630a_bl.c b/drivers/video/backlight/lm3630a_bl.c
index 2134342c2c97d..1de26785c3032 100644
--- a/drivers/video/backlight/lm3630a_bl.c
+++ b/drivers/video/backlight/lm3630a_bl.c
@@ -593,7 +593,6 @@ static int lm3630a_remove(struct i2c_client *client)
if (pchip->irq) {
free_irq(pchip->irq, pchip);
- flush_workqueue(pchip->irqthread);
destroy_workqueue(pchip->irqthread);
}
return 0;
--
2.53.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH 5.10.y 2/2] backlight: lm3630a: Cancel delayed work before destroying workqueue
2026-11-03 15:16 ` [PATCH 5.10.y 1/2] backlight: lm3630a_bl: Remove redundant 'flush_workqueue()' calls Sasha Levin
@ 2026-11-03 15:16 ` Sasha Levin
0 siblings, 0 replies; 3+ messages in thread
From: Sasha Levin @ 2026-11-03 15:16 UTC (permalink / raw)
To: stable
Cc: Myeonghun Pak, Ijae Kim, Daniel Thompson (RISCstar), Lee Jones,
Sasha Levin
From: Myeonghun Pak <mhun512@gmail.com>
[ Upstream commit 2cf184caab8b406fdd9db126ee40d62418237456 ]
The interrupt handler queues delayed work to read the interrupt status.
After free_irq() stops the producer, this work can still be waiting on its
timer. destroy_workqueue() cannot drain delayed work that has not yet been
queued by its timer, so the timer can outlive both the workqueue and the
devm-allocated chip containing the work.
Cancel the delayed work synchronously after freeing the IRQ and before
destroying the workqueue. This also waits for any running status read to
finish before the chip's resources are released.
This issue was identified during our ongoing static-analysis research
while reviewing kernel code.
Fixes: 0c2a665a648e ("backlight: add Backlight driver for lm3630 chip")
Cc: stable@vger.kernel.org
Assisted-by: LLM
Co-developed-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Myeonghun Pak <mhun512@gmail.com>
Reviewed-by: Daniel Thompson (RISCstar) <danielt@kernel.org>
Link: https://patch.msgid.link/20261003030439.599330-1-mhun512@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/video/backlight/lm3630a_bl.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/video/backlight/lm3630a_bl.c b/drivers/video/backlight/lm3630a_bl.c
index 1de26785c3032..3ee04acbc1d9d 100644
--- a/drivers/video/backlight/lm3630a_bl.c
+++ b/drivers/video/backlight/lm3630a_bl.c
@@ -593,6 +593,7 @@ static int lm3630a_remove(struct i2c_client *client)
if (pchip->irq) {
free_irq(pchip->irq, pchip);
+ cancel_delayed_work_sync(&pchip->work);
destroy_workqueue(pchip->irqthread);
}
return 0;
--
2.53.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-11-03 15:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-03 10:13 FAILED: patch "[PATCH] backlight: lm3630a: Cancel delayed work before destroying" failed to apply to 5.10-stable tree gregkh
2026-11-03 15:16 ` [PATCH 5.10.y 1/2] backlight: lm3630a_bl: Remove redundant 'flush_workqueue()' calls Sasha Levin
2026-11-03 15:16 ` [PATCH 5.10.y 2/2] backlight: lm3630a: Cancel delayed work before destroying workqueue Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox