linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bin Liu <b-liu@ti.com>
To: "Matwey V. Kornilov" <matwey.kornilov@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"open list:MUSB MULTIPOINT HIGH SPEED DUAL-ROLE CONTROLLER"
	<linux-usb@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: usb: musb: Fix potential NULL dereference
Date: Fri, 25 Jan 2019 10:44:12 -0600	[thread overview]
Message-ID: <20190125164412.GJ18982@uda0271908> (raw)

On Thu, Jan 24, 2019 at 09:47:02PM +0300, Matwey V. Kornilov wrote:
> By the way, why do we need to store the qh in urb->hcpriv?
> qh can always be accessible through urb->ep->hcpriv
> Wouldn't it be better to drop entire urb->hcpriv usage?

I am not sure why. The code is there since the first commit in a decade
ago. But I tend to agree with you.

In a quick search for urb->hcpriv and urb->ep->hcpriv, based on the
usage in core/hcd.c, it seems to me that urb->hcpriv should not be
changed in each controller driver, but I see both have been used in most
controller drivers. I will leave this to others to educate me.

Regards,
-Bin.

             reply	other threads:[~2019-01-25 16:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-25 16:44 Bin Liu [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-01-26  9:45 usb: musb: Fix potential NULL dereference Matwey V. Kornilov
2019-01-25 21:37 Alan Stern
2019-01-25 16:37 Bin Liu
2019-01-24 18:47 Matwey V. Kornilov
2019-01-23 17:51 Matwey V. Kornilov

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=20190125164412.GJ18982@uda0271908 \
    --to=b-liu@ti.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=matwey.kornilov@gmail.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;
as well as URLs for NNTP newsgroup(s).