From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: Marc Zyngier <maz@kernel.org>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Wesley Cheng <quic_wcheng@quicinc.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH] usb: xhci: Check for xhci->interrupters being allocated in xhci_mem_clearup()
Date: Mon, 5 Aug 2024 11:23:03 +0300 [thread overview]
Message-ID: <d3f16547-80db-48a8-9a6c-7eaf26da9ece@linux.intel.com> (raw)
In-Reply-To: <20240731205910.2060752-1-maz@kernel.org>
On 31.7.2024 23.59, Marc Zyngier wrote:
> If xhci_mem_init() fails, it calls into xhci_mem_cleanup() to mop
> up the damage. If it fails early enough, before xhci->interrupters
> is allocated but after xhci->max_interrupters has been set, which
> happens in most (all?) cases, things get uglier, as xhci_mem_cleanup()
> unconditionally derefences xhci->interrupters. With prejudice.
>
> Gate the interrupt freeing loop with a check on xhci->interrupters
> being non-NULL.
>
> Found while debugging a DMA allocation issue that led the XHCI driver
> on this exact path.
>
> Fixes: c99b38c41234 ("xhci: add support to allocate several interrupters")
> Cc: Mathias Nyman <mathias.nyman@linux.intel.com>
> Cc: Wesley Cheng <quic_wcheng@quicinc.com>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Marc Zyngier <maz@kernel.org>
> ---
Thanks, Adding to queue
-Mathias
prev parent reply other threads:[~2024-08-05 8:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-31 20:59 [PATCH] usb: xhci: Check for xhci->interrupters being allocated in xhci_mem_clearup() Marc Zyngier
2024-08-05 8:23 ` Mathias Nyman [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=d3f16547-80db-48a8-9a6c-7eaf26da9ece@linux.intel.com \
--to=mathias.nyman@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=maz@kernel.org \
--cc=quic_wcheng@quicinc.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