[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250222010230.9102-1-lizhi.xu@windriver.com>
Date: Sat, 22 Feb 2025 09:02:30 +0800
From: Lizhi Xu <lizhi.xu@...driver.com>
To: <rafael@...nel.org>
CC: <len.brown@...el.com>, <linux-kernel@...r.kernel.org>,
<linux-pm@...r.kernel.org>, <lizhi.xu@...driver.com>,
<pavel@...nel.org>,
<syzbot+ace60642828c074eb913@...kaller.appspotmail.com>,
<syzkaller-bugs@...glegroups.com>
Subject: Re: [PATCH] module: replace the mutex lock acquisition method
On Fri, 21 Feb 2025 21:07:59 +0100, Rafael J. Wysocki" <rafael@...nel.org> 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?
Yes, you are right, I have confirmed that can work fine.
I will send V2 patch for using mutex_trylock(&system_transition_mutex).
BR,
Lizhi
Powered by blists - more mailing lists