From: Greg KH <gregkh@linuxfoundation.org>
To: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
Cc: linux-usb@vger.kernel.org, robh@kernel.org,
p.zabel@pengutronix.de, stern@rowland.harvard.edu, arnd@arndb.de,
peter.chen@freescale.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] USB: core: of: Check device_node before parsing in usb_of_get_child_node()
Date: Mon, 15 Aug 2016 20:41:17 +0200 [thread overview]
Message-ID: <20160815184117.GA883@kroah.com> (raw)
In-Reply-To: <1471285870-21433-1-git-send-email-vaibhav.hiremath@linaro.org>
On Mon, Aug 15, 2016 at 11:31:10AM -0700, Vaibhav Hiremath wrote:
> In case of HUB devices connected to USB ports, we may not have DT
> node representing it inside USB, and when devices connected to hub
> gets enumerated, call to usb_of_get_child_node() leads to NULL pointer
> dereference.
Really? That seems messed up.
> In the usecase we have, where EHCI port is connected to USB HUB
> device, and downward ports of HUB are connected to further USB
> devices. When those devices gets enumerated, in order,
> 1. USB HUB ->
> -> Call to usb_of_get_child_node() is OK, as
> parent->dev.of_node is pointing to host node.
> 2. Devices connected to downward port of USB HUB
> -> Call to usb_of_get_child_node() leads to NULL
> pointer dereference as parent->dev.of_node = NULL,
> as USB HUB DTS node may be empty.
Why is the hub DTS empty? Shouldn't that be the fix here?
thanks,
greg k-h
next prev parent reply other threads:[~2016-08-15 18:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-15 18:31 [PATCH] USB: core: of: Check device_node before parsing in usb_of_get_child_node() Vaibhav Hiremath
2016-08-15 18:41 ` Greg KH [this message]
2016-08-15 19:18 ` Vaibhav Hiremath
2016-08-15 19:34 ` Alan Stern
2016-08-16 1:33 ` Peter Chen
2016-08-16 21:14 ` Vaibhav Hiremath
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=20160815184117.GA883@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=peter.chen@freescale.com \
--cc=robh@kernel.org \
--cc=stern@rowland.harvard.edu \
--cc=vaibhav.hiremath@linaro.org \
/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