lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <n405o2oq-s9p1-5o80-n2rn-8n7n9n8362po@xreary.bet>
Date: Tue, 10 Jun 2025 21:44:00 +0200 (CEST)
From: Jiri Kosina <jikos@...nel.org>
To: Zihuan Zhang <zhangzihuan@...inos.cn>
cc: bentiss@...nel.org, linux-input@...r.kernel.org, 
    linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1] HID: debug: Use the __set_current_state()

On Fri, 9 May 2025, Zihuan Zhang wrote:

> 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.

Good catch.

Now queued in hid.git#for-6.17/core.

Thanks,

-- 
Jiri Kosina
SUSE Labs


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ