linux/drivers/w1
Yang Yingliang 36225a7c72 w1: fix WARNING after calling w1_process()
I got the following WARNING message while removing driver(ds2482):

------------[ cut here ]------------
do not call blocking ops when !TASK_RUNNING; state=1 set at [<000000002d50bfb6>] w1_process+0x9e/0x1d0 [wire]
WARNING: CPU: 0 PID: 262 at kernel/sched/core.c:9817 __might_sleep+0x98/0xa0
CPU: 0 PID: 262 Comm: w1_bus_master1 Tainted: G                 N 6.1.0-rc3+ #307
RIP: 0010:__might_sleep+0x98/0xa0
Call Trace:
 exit_signals+0x6c/0x550
 do_exit+0x2b4/0x17e0
 kthread_exit+0x52/0x60
 kthread+0x16d/0x1e0
 ret_from_fork+0x1f/0x30

The state of task is set to TASK_INTERRUPTIBLE in loop in w1_process(),
set it to TASK_RUNNING when it breaks out of the loop to avoid the
warning.

Fixes: 3c52e4e627 ("W1: w1_process, block or sleep")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20221205101558.3599162-1-yangyingliang@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-19 17:26:33 +01:00
..
masters i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
slaves w1: w1_therm: Add support for Maxim MAX31850 thermoelement IF. 2022-03-18 14:07:09 +01:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile
w1_family.c
w1_int.c w1: fix deadloop in __w1_remove_master_device() 2023-01-19 17:26:31 +01:00
w1_internal.h
w1_io.c
w1_netlink.c w1: Split memcpy() of struct cn_msg flexible array 2022-09-30 14:37:10 +02:00
w1_netlink.h w1: Replace zero-length array with flexible-array 2020-06-15 23:08:32 -05:00
w1.c w1: fix WARNING after calling w1_process() 2023-01-19 17:26:33 +01:00