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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJZ5v0hu=Gi82zS27MwKj-uhEciuD6JN8cZLd+75J3VKY796wg@mail.gmail.com>
Date: Fri, 21 Feb 2025 21:07:59 +0100
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Lizhi Xu <lizhi.xu@...driver.com>
Cc: rafael@...nel.org, len.brown@...el.com, linux-kernel@...r.kernel.org, 
	linux-pm@...r.kernel.org, pavel@...nel.org, syzkaller-bugs@...glegroups.com
Subject: Re: [PATCH V2] module: replace the mutex lock acquisition method

On Fri, Feb 21, 2025 at 1:35 PM Lizhi Xu <lizhi.xu@...driver.com> wrote:
>
> syzbot reported a deadlock in lock_system_sleep. [1]
>
> The write operation to "/sys/module/hibernate/parameters/compressor"
> conflicts with the registration of ieee80211 device, resulting in a deadlock
> in the lock param_lock.
>
> Since the conflict cannot be avoided, the way to obtain param_lock is changed
> to trylock to avoid deadlock.

An alternative way to avoid the deadlock would be to replace
lock_system_sleep() in hibernate_compressor_param_set() with
mutex_trylock(&system_transition_mutex) (and analogously for the
unlock operation).  Why have you not done that?

It is arguably better to fail a write to the module param with -EBUSY
than to fail ieee80211_register_hw() IMV.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ