]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Nov 2025 00:41:56 +0000 (09:41 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Nov 2025 00:41:56 +0000 (09:41 +0900)
added patches:
extcon-adc-jack-cleanup-wakeup-source-only-if-it-was-enabled.patch

queue-5.4/extcon-adc-jack-cleanup-wakeup-source-only-if-it-was-enabled.patch [new file with mode: 0644]
queue-5.4/series

diff --git a/queue-5.4/extcon-adc-jack-cleanup-wakeup-source-only-if-it-was-enabled.patch b/queue-5.4/extcon-adc-jack-cleanup-wakeup-source-only-if-it-was-enabled.patch
new file mode 100644 (file)
index 0000000..d5e0ea2
--- /dev/null
@@ -0,0 +1,36 @@
+From 92bac7d4de9c07933f6b76d8f1c7f8240f911f4f Mon Sep 17 00:00:00 2001
+From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
+Date: Fri, 9 May 2025 09:17:04 +0200
+Subject: extcon: adc-jack: Cleanup wakeup source only if it was enabled
+
+From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
+
+commit 92bac7d4de9c07933f6b76d8f1c7f8240f911f4f upstream.
+
+Driver in the probe enables wakeup source conditionally, so the cleanup
+path should do the same - do not release the wakeup source memory if it
+was not allocated.
+
+Link: https://lore.kernel.org/lkml/20250509071703.39442-2-krzysztof.kozlowski@linaro.org/
+Reported-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
+Closes: https://lore.kernel.org/r/22aaebb7-553b-4571-8a43-58a523241082@wanadoo.fr/
+Fixes: 78b6a991eb6c ("extcon: adc-jack: Fix wakeup source leaks on device unbind")
+Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
+Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/extcon/extcon-adc-jack.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/extcon/extcon-adc-jack.c
++++ b/drivers/extcon/extcon-adc-jack.c
+@@ -162,7 +162,8 @@ static int adc_jack_remove(struct platfo
+ {
+       struct adc_jack_data *data = platform_get_drvdata(pdev);
+-      device_init_wakeup(&pdev->dev, false);
++      if (data->wakeup_source)
++              device_init_wakeup(&pdev->dev, false);
+       free_irq(data->irq, data);
+       cancel_work_sync(&data->handler.work);
index ba387c5f658bd0bc6c0b2e44d8fd96c303918517..5080e48e8def484e10085a27efcce17551f58751 100644 (file)
@@ -121,3 +121,4 @@ sctp-hold-rcu-read-lock-while-iterating-over-address.patch
 sctp-prevent-toctou-out-of-bounds-write.patch
 net-usb-qmi_wwan-initialize-mac-header-offset-in-qmi.patch
 tracing-fix-memory-leaks-in-create_field_var.patch
+extcon-adc-jack-cleanup-wakeup-source-only-if-it-was-enabled.patch