mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Prashanth K <prashanth.k@oss.qualcomm.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: dwc3: host: Mark dwc->xhci as null if xhci probe fails
Date: Wed, 14 Oct 2026 16:55:01 +0530	[thread overview]
Message-ID: <e1ba6c21-a22e-46da-ae7d-3ba7893eaab0@oss.qualcomm.com> (raw)
In-Reply-To: <2026101452-wow-scarecrow-c7d8@gregkh>



On 10/14/2026 4:47 PM, Greg Kroah-Hartman wrote:
> On Wed, Oct 14, 2026 at 04:27:11PM +0530, Prashanth K wrote:
>> Currently dwc->xhci is not cleared when xhci_plat_probe fails,
>> leading to null pointer dereference in dwc3_qcom_read_usb2_speed.
> 
> Why would that happen?  What causes it and requires it?
> 
>> Mark the xhci pointer as NULL to prevent this.
>>
>> Signed-off-by: Prashanth K <prashanth.k@oss.qualcomm.com>
> 
> What commit id does this fix?
> How was it tested?
> 
> thanks,
> 
> greg k-h

This might not fix the issue, because it doesn't take the 'err' path,
just realized that platform_device_add() doesn't return error value if
the device probe fails.

The crash happens because xhci_halt failed (not sure what caused it),
thats a functional failure from USB, but later the device crashed while
trying to perform system suspend.

Unable to handle kernel NULL pointer dereference at virtual address
0000000000000058

Call trace:
dwc3_qcom_pm_suspend
dpm_run_callback
device_suspend
dpm_suspend
dpm_suspend_start
suspend_devices_and_enter
pm_suspend

Sorry for the spam,
Prashanth K

      reply	other threads:[~2026-10-14 11:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-14 10:57 Prashanth K
2026-10-14 11:17 ` Greg Kroah-Hartman
2026-10-14 11:25   ` Prashanth K [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=e1ba6c21-a22e-46da-ae7d-3ba7893eaab0@oss.qualcomm.com \
    --to=prashanth.k@oss.qualcomm.com \
    --cc=Thinh.Nguyen@synopsys.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.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

all inboxes | Powered by JetHome®