From: Oliver Neukum <oneukum@suse.com>
To: Greg KH <gregkh@linuxfoundation.org>, shitao <shitao@kylinos.cn>
Cc: zaitcev@redhat.com, linux-usb@vger.kernel.org
Subject: Re: [PATH v2] usb: usblp: add the reset_resume function interface
Date: Tue, 17 Mar 2026 15:14:15 +0100 [thread overview]
Message-ID: <da512301-2c87-4e02-ae92-02e2d856d4ff@suse.com> (raw)
In-Reply-To: <2026031730-fanatic-alias-3d85@gregkh>
On 17.03.26 14:28, Greg KH wrote:
> On Tue, Mar 17, 2026 at 08:56:14PM +0800, shitao wrote:
>> Add reset_resume callback to prevent premature device unbinding during
>> S4 (hibernation) thaw phase, which would otherwise cause usblp to require
>> a re-probe — a process that is slow and trigger error -517, and even
>> has a high probability of causing use-after-free bugs and kernel panics.
Hi,
I am sorry but this patch is fundamentally broken. Let me explain.
Implementing reset_resume() means that a driver has to guarantee
that the device is restored to the same state it had when suspend()
was called. For a printer you cannot do that. Its state depends
on the data you sent to it before suspend() was called and that
data is gone and the driver does not understand it.
Implementing reset_resume() for usblp is basically impossible.
Instead we need to fix the issue you are seeing. Do you have
a call trace?
NACKED-BY: Oliver Neukum <oneukum@suse.com>
Regards
Oliver
next prev parent reply other threads:[~2026-03-17 14:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-17 12:56 [PATH v2] usb: usblp: add the reset_resume function interface shitao
2026-03-17 13:28 ` Greg KH
2026-03-17 14:14 ` Oliver Neukum [this message]
2026-03-17 14:06 ` Alan Stern
2026-03-17 14:35 ` Oliver Neukum
2026-03-17 16:38 ` Alan Stern
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=da512301-2c87-4e02-ae92-02e2d856d4ff@suse.com \
--to=oneukum@suse.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-usb@vger.kernel.org \
--cc=shitao@kylinos.cn \
--cc=zaitcev@redhat.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