linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oliver Neukum <oneukum@suse.com>
To: 自己 <ccc194101@163.com>, "Alan Stern" <stern@rowland.harvard.edu>
Cc: gregkh@linuxfoundation.org, jannh@google.com,
	rex.nie@jaguarmicro.com, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	chenchangcheng <chenchangcheng@kylinos.cn>
Subject: Re: [PATCH] usb: usbfs: Add reset_resume callback to usbfs.
Date: Mon, 25 Aug 2025 11:50:10 +0200	[thread overview]
Message-ID: <d3ee7c98-c987-48db-b68c-645b38ae51a2@suse.com> (raw)
In-Reply-To: <23f1c6c2.2011.198df066c15.Coremail.ccc194101@163.com>

On 8/25/25 04:19, 自己 wrote:

> According to the current experimental findings, when userspace encounters
> an error while using the previous file descriptor (fd), it does not proceed to unbind
> and rebind automatically. Therefore, the two uevents were added in the kernel to explicitly
> notify userspace to unbind and rebind.

Sure, but that means that user space has a bug.
That race is present in every case. Even if the kernel
were to notify user space by additional channels,
user space could already be in the process of calling
into the kernel.
There is no way of avoiding the need for user space
to handle this error return correctly.

	Regards
		Oliver


  reply	other threads:[~2025-08-25  9:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-22  2:46 [PATCH] usb: usbfs: Add reset_resume callback to usbfs ccc194101
2025-08-22  4:49 ` Greg KH
2025-08-22 20:30 ` Alan Stern
2025-08-25  1:36   ` 自己
2025-08-25  2:01     ` Alan Stern
2025-08-25  2:19       ` 自己
2025-08-25  9:50         ` Oliver Neukum [this message]
2025-08-25 14:04         ` 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=d3ee7c98-c987-48db-b68c-645b38ae51a2@suse.com \
    --to=oneukum@suse.com \
    --cc=ccc194101@163.com \
    --cc=chenchangcheng@kylinos.cn \
    --cc=gregkh@linuxfoundation.org \
    --cc=jannh@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=rex.nie@jaguarmicro.com \
    --cc=stern@rowland.harvard.edu \
    /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;
as well as URLs for NNTP newsgroup(s).