Commit d3db1ce9 authored by Zihuan Zhang's avatar Zihuan Zhang Committed by Jiri Kosina
Browse files

HID: debug: Use the __set_current_state()



When detecting an invalid list->hdev, the process needs to manually set
its state to TASK_RUNNING and exit. In the original code,
set_current_state() (which includes a memory barrier) is used here, but
it is immediately followed by a mutex_unlock() call. Since
mutex_unlock() internally includes a memory barrier, this ensures that
all modifications within the critical section (including the process
state) are visible to other CPUs. Therefore, replacing it with
__set_current_state() (without an implicit barrier) avoids redundant
memory barriers.

Signed-off-by: default avatarZihuan Zhang <zhangzihuan@kylinos.cn>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.com>
parent 2043ae90
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment