From: Lizhi Xu <lizhi.xu@windriver.com>
To: <rafael@kernel.org>
Cc: <len.brown@intel.com>, <linux-kernel@vger.kernel.org>,
<linux-pm@vger.kernel.org>, <lizhi.xu@windriver.com>,
<pavel@kernel.org>,
<syzbot+ace60642828c074eb913@syzkaller.appspotmail.com>,
<syzkaller-bugs@googlegroups.com>
Subject: Re: [PATCH] module: replace the mutex lock acquisition method
Date: Sat, 22 Feb 2025 09:02:30 +0800 [thread overview]
Message-ID: <20250222010230.9102-1-lizhi.xu@windriver.com> (raw)
In-Reply-To: <CAJZ5v0hu=Gi82zS27MwKj-uhEciuD6JN8cZLd+75J3VKY796wg@mail.gmail.com>
On Fri, 21 Feb 2025 21:07:59 +0100, Rafael J. Wysocki" <rafael@kernel.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
next prev parent reply other threads:[~2025-02-22 1:02 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-20 15:16 [syzbot] [pm?] possible deadlock in lock_system_sleep syzbot
2025-02-21 1:45 ` [syzbot] " syzbot
2025-02-21 2:57 ` syzbot
2025-02-21 6:27 ` syzbot
2025-02-21 10:10 ` [PATCH] module: replace the mutex lock acquisition method Lizhi Xu
2025-02-21 11:41 ` Rafael J. Wysocki
2025-02-21 12:32 ` Lizhi Xu
2025-02-21 12:35 ` [PATCH V2] " Lizhi Xu
2025-02-21 20:07 ` Rafael J. Wysocki
2025-02-22 1:02 ` Lizhi Xu [this message]
2025-02-22 4:45 ` [PATCH V3] " Lizhi Xu
2025-02-23 13:01 ` Rafael J. Wysocki
2025-02-24 1:31 ` [PATCH V4] " Lizhi Xu
2025-02-26 15:01 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250222010230.9102-1-lizhi.xu@windriver.com \
--to=lizhi.xu@windriver.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=pavel@kernel.org \
--cc=rafael@kernel.org \
--cc=syzbot+ace60642828c074eb913@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®