From: Oliver Neukum <oneukum@suse.com>
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>,
Greg KH <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>
Cc: Len Brown <len.brown@intel.com>, Pavel Machek <pavel@ucw.cz>,
Arnd Bergmann <arnd@arndb.de>,
linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
Wedson Almeida Filho <wedsonaf@google.com>,
Dmitry Vyukov <dvyukov@google.com>,
Arjan van de Ven <arjan@linux.intel.com>
Subject: Re: [PATCH] char: misc: make misc_open() and misc_register() killable
Date: Wed, 6 Jul 2022 14:17:38 +0200 [thread overview]
Message-ID: <9e45b464-c680-7d22-c81d-9640059ef913@suse.com> (raw)
In-Reply-To: <a6d98824-56c8-6d92-bb1b-eb065b57cb81@I-love.SAKURA.ne.jp>
On 06.07.22 12:26, Tetsuo Handa wrote:
> wait_for_device_probe() in snapshot_open() was added by commit c751085943362143
> ("PM/Hibernate: Wait for SCSI devices scan to complete during resume"), and
> that commit did not take into account possibility of unresponsive hardware.
>
> "In addition, if the resume from hibernation is userland-driven, it's
> better to wait for all device probes in the kernel to complete before
> attempting to open the resume device."
>
>
Testsuo-san,
I am afraid my first reply was too court to be useful. Sorry for that.
First let me congratulate you for finding and analyzing an important
issue.
Yet, I am afraid while your analysis is good, your attempt at a fix
suffers from being too close to the analysis, instead of taking a step
back and looking at root causes.
Frankly I was afraid you'd look at UAS next and try to fix it in the
same way. And that is the core of the issue. IF the SCSI layer can be
made to hang a host controller by an unresponsive device, the issue
is in the SCSI layer. If you were to insist on your current approach
you'd have to go through every host controller driver. You are just
seeing this only with storage because you are fuzzing USB, not SCSI.
But the bug you found is more fundamental than a single bus system.
The SCSI layer is just designed in such a way that timeouts are handled
by the core. That is a fundamental design decision you cannot easily
deviate from. Hence I would like to ask you to take a closer look
at the scanning code in the SCSI layer, not a host controller driver.
Regards
Oliver
prev parent reply other threads:[~2022-07-06 12:17 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-13 12:38 INFO: task hung in misc_open (4) syzbot
2022-07-04 6:44 ` [PATCH] char: misc: make misc_open() and misc_register() killable Tetsuo Handa
2022-07-04 7:29 ` Greg KH
2022-07-04 10:25 ` Tetsuo Handa
2022-07-04 11:01 ` Greg KH
2022-07-04 12:34 ` Tetsuo Handa
2022-07-04 12:59 ` Wedson Almeida Filho
2022-07-04 13:48 ` Tetsuo Handa
2022-07-04 13:57 ` Wedson Almeida Filho
2022-07-04 14:07 ` Tetsuo Handa
2022-07-04 14:46 ` Wedson Almeida Filho
2022-07-04 14:31 ` Greg KH
2022-07-05 5:21 ` Tetsuo Handa
2022-07-05 5:37 ` Greg KH
[not found] ` <a1fcc07e-51ef-eaad-f14b-33f1263e45ac@I-love.SAKURA.ne.jp>
2022-07-05 7:20 ` Dmitry Vyukov
2022-07-05 10:10 ` Greg Kroah-Hartman
2022-07-08 6:06 ` Dmitry Vyukov
2022-07-05 14:01 ` Tetsuo Handa
2022-07-05 14:16 ` Greg KH
2022-07-05 14:35 ` Tetsuo Handa
2022-07-06 6:21 ` Tetsuo Handa
2022-07-06 6:34 ` Greg KH
2022-07-06 10:26 ` Tetsuo Handa
2022-07-06 11:04 ` Oliver Neukum
2022-07-07 5:06 ` Tetsuo Handa
2022-07-07 8:04 ` Greg KH
2022-07-08 13:37 ` Greg KH
2022-07-10 2:27 ` Tetsuo Handa
2022-07-06 12:17 ` Oliver Neukum [this message]
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=9e45b464-c680-7d22-c81d-9640059ef913@suse.com \
--to=oneukum@suse.com \
--cc=arjan@linux.intel.com \
--cc=arnd@arndb.de \
--cc=dvyukov@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=penguin-kernel@I-love.SAKURA.ne.jp \
--cc=rafael@kernel.org \
--cc=wedsonaf@google.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®