From: Greg KH <greg@kroah.com>
To: Ben Hutchings <ben.hutchings@codethink.co.uk>
Cc: stable@vger.kernel.org, Mathias Nyman <mathias.nyman@intel.com>,
linux-usb@vger.kernel.org
Subject: [stable,3.18-4.9] xhci: Fix ring leak in failure path of xhci_alloc_virt_device()
Date: Thu, 11 Jan 2018 18:13:10 +0100 [thread overview]
Message-ID: <20180111171310.GA11641@kroah.com> (raw)
On Thu, Jan 11, 2018 at 05:01:36PM +0000, Ben Hutchings wrote:
> This is a stable-only fix for the backport of commit 5d9b70f7d52e
> ("xhci: Don't add a virt_dev to the devs array before it's fully
> allocated").
>
> In branches that predate commit c5628a2af83a ("xhci: remove endpoint
> ring cache") there is an additional failure path in
> xhci_alloc_virt_device() where ring cache allocation fails, in
> which case we need to free the ring allocated for endpoint 0.
>
> Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
> ---
> This is build-tested only.
Looks good to me, thanks for this!
Mathias, yell if you think it's wrong :)
greg k-h
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next reply other threads:[~2018-01-11 17:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-11 17:13 Greg KH [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-01-11 17:01 [stable,3.18-4.9] xhci: Fix ring leak in failure path of xhci_alloc_virt_device() Ben Hutchings
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=20180111171310.GA11641@kroah.com \
--to=greg@kroah.com \
--cc=ben.hutchings@codethink.co.uk \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@intel.com \
--cc=stable@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;
as well as URLs for NNTP newsgroup(s).