From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out3-smtp.messagingengine.com ([66.111.4.27]:37819 "EHLO out3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751923AbeAKRNM (ORCPT ); Thu, 11 Jan 2018 12:13:12 -0500 Date: Thu, 11 Jan 2018 18:13:10 +0100 From: Greg KH To: Ben Hutchings Cc: stable@vger.kernel.org, Mathias Nyman , linux-usb@vger.kernel.org Subject: Re: [PATCH stable 3.18-4.9] xhci: Fix ring leak in failure path of xhci_alloc_virt_device() Message-ID: <20180111171310.GA11641@kroah.com> References: <20180111170136.abfqwdgvgapfiumn@xylophone.i.decadent.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180111170136.abfqwdgvgapfiumn@xylophone.i.decadent.org.uk> Sender: stable-owner@vger.kernel.org List-ID: 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 > --- > This is build-tested only. Looks good to me, thanks for this! Mathias, yell if you think it's wrong :) greg k-h