All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hui Wang <hui.wang@canonical.com>
To: Oliver Neukum <oneukum@suse.com>,
	Hans de Goede <hdegoede@redhat.com>,
	linux-usb@vger.kernel.org, gregkh@linuxfoundation.org
Subject: Re: [PATCH] USB: UAS: don't unbind and rebind the driver during usb_reset_device
Date: Mon, 22 Feb 2021 23:14:15 +0800	[thread overview]
Message-ID: <2b6d426d-068e-a66f-b3e2-9c8f2de9b8d0@canonical.com> (raw)
In-Reply-To: <9fd28086226b7b8b49ac9047a06e92e4da154f73.camel@suse.com>


On 2/22/21 9:50 PM, Oliver Neukum wrote:
> Am Montag, den 22.02.2021, 21:02 +0800 schrieb Hui Wang:
>> On 2/22/21 8:51 PM, Oliver Neukum wrote:
>>> Am Montag, den 22.02.2021, 20:40 +0800 schrieb Hui Wang:
>>>> On 2/22/21 3:59 PM, Oliver Neukum wrote:
>>>> OK, will find a UAS device to do the test.
>>> Hi,
>>>
>>> do you have a design at all?
>> No, so far what I could find is all driven by usb-storage, I tested a
>> couple of usb-sdcard-readers and usb-scsi/ata disk adapters, they all
>> belong to USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, USB_SC_SCSI,
>> USB_PR_BULK) instead of USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE,
>> USB_SC_SCSI, USB_PR_UAS). I plan to go to the office to find some usb
>> storage devices to test.
> Hi,
>
> please wait.  First of all, you are making the assumption that all
> resets originate from the SCSI layer. You cannot make that assumption.
>
> Secondly, yes, ideally we should not pretend that a disconnect has
> happened, when it hasn't happened, but what is your alternative.
> What exactly do you want to test? You have not even defined the
> desirable behavior and the problem you are seeing with the current
> behavior.

I planed to forcibly (simulate) trigger calling 
eh_device_reset_handler() from scsi layer and let pre_reset() or 
post_reset() return a non-zero, and test if there is use-after-free 
issue in the rest part of eh_device_reset_handler() and its callers. But 
after thinking of your comment, looks like I was wrong. Thanks for your 
instructions on this issue.

Thanks,

Hui.

> 	Regards
> 		Oliver
>
>

      reply	other threads:[~2021-02-22 15:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-21  8:51 [PATCH] USB: UAS: don't unbind and rebind the driver during usb_reset_device Hui Wang
2021-02-21 10:20 ` Hans de Goede
2021-02-21 13:23   ` Hui Wang
2021-02-22  7:59   ` Oliver Neukum
2021-02-22 12:40     ` Hui Wang
2021-02-22 12:51       ` Oliver Neukum
2021-02-22 13:02         ` Hui Wang
2021-02-22 13:50           ` Oliver Neukum
2021-02-22 15:14             ` Hui Wang [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=2b6d426d-068e-a66f-b3e2-9c8f2de9b8d0@canonical.com \
    --to=hui.wang@canonical.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hdegoede@redhat.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=oneukum@suse.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.