linux/fs/smb
Namjae Jeon 8f805b3746 ksmbd: fix WARNING "do not call blocking ops when !TASK_RUNNING"
[ Upstream commit 1df0d4c616 ]

wait_event_timeout() will set the state of the current
task to TASK_UNINTERRUPTIBLE, before doing the condition check. This
means that ksmbd_durable_scavenger_alive() will try to acquire the mutex
while already in a sleeping state. The scheduler warns us by giving
the following warning:

do not call blocking ops when !TASK_RUNNING; state=2 set at
 [<0000000061515a6f>] prepare_to_wait_event+0x9f/0x6c0
WARNING: CPU: 2 PID: 4147 at kernel/sched/core.c:10099 __might_sleep+0x12f/0x160

mutex lock is not needed in ksmbd_durable_scavenger_alive().

Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-05-02 07:59:27 +02:00
..
client cifs: Fix querying of WSL CHR and BLK reparse points over SMB1 2025-05-02 07:59:25 +02:00
common smb: common: change the data type of num_aces to le16 2025-04-10 14:39:29 +02:00
server ksmbd: fix WARNING "do not call blocking ops when !TASK_RUNNING" 2025-05-02 07:59:27 +02:00
Kconfig smb: move client and server files to common directory fs/smb 2023-05-24 16:29:21 -05:00
Makefile smb: move client and server files to common directory fs/smb 2023-05-24 16:29:21 -05:00