diff options
author | Armin Wolf <[email protected]> | 2022-04-07 12:13:12 +0200 |
---|---|---|
committer | Guenter Roeck <[email protected]> | 2022-04-08 08:39:03 -0700 |
commit | 7b2666ce445c700b8dcee994da44ddcf050a0842 (patch) | |
tree | 9e559823eeef5457d353980d7787b368af281caf /tools/perf/scripts/python/failed-syscalls-by-pid.py | |
parent | 4fd45cc8568e6086272d3036f2c29d61e9b776a1 (diff) |
hwmon: (adt7470) Fix warning on module removal
When removing the adt7470 module, a warning might be printed:
do not call blocking ops when !TASK_RUNNING; state=1
set at [<ffffffffa006052b>] adt7470_update_thread+0x7b/0x130 [adt7470]
This happens because adt7470_update_thread() can leave the kthread in
TASK_INTERRUPTIBLE state when the kthread is being stopped before
the call of set_current_state(). Since kthread_exit() might sleep in
exit_signals(), the warning is printed.
Fix that by using schedule_timeout_interruptible() and removing
the call of set_current_state().
This causes TASK_INTERRUPTIBLE to be set after kthread_should_stop()
which might cause the kthread to exit.
Reported-by: Zheyu Ma <[email protected]>
Fixes: 93cacfd41f82 (hwmon: (adt7470) Allow faster removal)
Signed-off-by: Armin Wolf <[email protected]>
Tested-by: Zheyu Ma <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Guenter Roeck <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/failed-syscalls-by-pid.py')
0 files changed, 0 insertions, 0 deletions