/[packages]/cauldron/kernel/current/PATCHES/patches/0082-thermal-rcar_thermal-Prevent-doing-work-after-unbind.patch
ViewVC logotype

Contents of /cauldron/kernel/current/PATCHES/patches/0082-thermal-rcar_thermal-Prevent-doing-work-after-unbind.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1329221 - (show annotations) (download)
Fri Nov 9 22:05:45 2018 UTC (5 years, 10 months ago) by tmb
File size: 1619 byte(s)
add fixes from sashas autosel queue
1 From e428af2e83feaad4cbd65d59e456e7e719ecb8ec Mon Sep 17 00:00:00 2001
2 From: Geert Uytterhoeven <geert+renesas@glider.be>
3 Date: Fri, 12 Oct 2018 09:20:16 +0200
4 Subject: [PATCH 082/145] thermal: rcar_thermal: Prevent doing work after
5 unbind
6 MIME-Version: 1.0
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
9
10 [ Upstream commit 697ee786f15d7b65c7f3045d45fe3a05d28e0911 ]
11
12 When testing bind/unbind on r8a7791/koelsch:
13
14 WARNING: CPU: 1 PID: 697 at lib/debugobjects.c:329 debug_print_object+0x8c/0xb4
15 ODEBUG: free active (active state 0) object type: timer_list hint: delayed_work_timer_fn+0x0/0x10
16
17 This happens if the workqueue runs after the device has been unbound.
18 Fix this by cancelling any queued work during remove.
19
20 Fixes: e0a5172e9eec7f0d ("thermal: rcar: add interrupt support")
21 Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
22 Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
23 Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
24 Signed-off-by: Sasha Levin <sashal@kernel.org>
25 ---
26 drivers/thermal/rcar_thermal.c | 1 +
27 1 file changed, 1 insertion(+)
28
29 diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c
30 index 78f932822d38..8df2ce94c28d 100644
31 --- a/drivers/thermal/rcar_thermal.c
32 +++ b/drivers/thermal/rcar_thermal.c
33 @@ -453,6 +453,7 @@ static int rcar_thermal_remove(struct platform_device *pdev)
34
35 rcar_thermal_for_each_priv(priv, common) {
36 rcar_thermal_irq_disable(priv);
37 + cancel_delayed_work_sync(&priv->work);
38 if (priv->chip->use_of_thermal)
39 thermal_remove_hwmon_sysfs(priv->zone);
40 else
41 --
42 2.19.1
43

  ViewVC Help
Powered by ViewVC 1.1.30