From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: John Garry <john.garry@huawei.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>
Subject: Re: [Report]: BUG: KASAN: use-after-free in usb_hcd_pci_remove
Date: Mon, 17 Aug 2020 14:35:09 +0300 [thread overview]
Message-ID: <20200817113509.GJ1891694@smile.fi.intel.com> (raw)
In-Reply-To: <20200816160550.GB86937@rowland.harvard.edu>
On Sun, Aug 16, 2020 at 12:05:50PM -0400, Alan Stern wrote:
> On Sun, Aug 16, 2020 at 11:33:14AM +0300, Andy Shevchenko wrote:
> > On Sat, Aug 15, 2020 at 4:50 AM Alan Stern <stern@rowland.harvard.edu> wrote:
> > > On Sat, Aug 15, 2020 at 12:55:57AM +0300, Andy Shevchenko wrote:
...
> > > Sure, the difference in ordering was pretty obvious. What is not
> > > obvious is why this should cause a problem.
> >
> > It may be not causing any problem right now, but with all these small
> > steps we may come to the case like DWC3 removal mess.
> >
> > > Do you think that the host controller driver is going to try to use the
> > > IRQ vector somewhere between the pci_free_irq_vectors call and the
> > > usb_put_hcd call? If that's not going to happen then I don't see what
> > > difference the order of the two calls makes.
> >
> > I think that this is a bit incorrect to rely on side-effects to ruin
> > the clear understanding of what ordering is going on. If you insist,
> > you can take John's solution, but I won't give a tag on such.
> >
> > Also take into consideration the possible copy'n'paste of this example
> > to other drivers. I have seen a lot of bad examples were
> > copied'n'pasted all over the kernel during my reviews. I don't want to
> > give another one.
> >
> > So, the review process, in my opinion, should be slightly broader that
> > we usually understand it, i.e. take into account:
> > - *run-time* bisectability
> > - possible copy'n'paste of the code excerpts
>
> I see. So you use "correct" in the broader sense of "good form" as well
> as strict correctness. (It was confusing because I wouldn't conflate
> those two different concepts.)
Thank you for clarification, I'm not native speaker and this is a good learn
to me. I will try to use better wording in the future.
> Okay, now your reply makes sense.
Thanks!
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2020-08-17 11:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-13 15:29 [Report]: BUG: KASAN: use-after-free in usb_hcd_pci_remove John Garry
2020-08-13 18:28 ` Greg Kroah-Hartman
2020-08-14 7:26 ` John Garry
2020-08-14 17:18 ` John Garry
2020-08-14 18:07 ` Andy Shevchenko
2020-08-14 19:51 ` Alan Stern
[not found] ` <CAHp75VdMXd3LWLM5ooBsWGZnSXnJBW3R5gH9Cpux0EHmcxjTvQ@mail.gmail.com>
2020-08-15 1:50 ` Alan Stern
2020-08-16 8:33 ` Andy Shevchenko
2020-08-16 16:05 ` Alan Stern
2020-08-17 11:35 ` Andy Shevchenko [this message]
2020-08-18 8:41 ` John Garry
2020-08-18 9:43 ` Andy Shevchenko
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=20200817113509.GJ1891694@smile.fi.intel.com \
--to=andy.shevchenko@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=john.garry@huawei.com \
--cc=linux-usb@vger.kernel.org \
--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).