From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751777AbdKFIJ3 (ORCPT ); Mon, 6 Nov 2017 03:09:29 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:54888 "EHLO huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1750715AbdKFIJ2 (ORCPT ); Mon, 6 Nov 2017 03:09:28 -0500 Subject: Re: [PATCH] usb:xhci fix panic in xhci_free_virt_devices_depth_first To: Greg KH References: <20171106032855.16736-1-chenyu56@huawei.com> <20171106075944.GA19812@kroah.com> CC: , , , , , , , , From: Chen Yu Message-ID: <1bb9152e-083c-a2ac-4b71-94b14454c012@huawei.com> Date: Mon, 6 Nov 2017 16:07:55 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20171106075944.GA19812@kroah.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.142.63.192] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2017/11/6 15:59, Greg KH wrote: >> >> diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c >> index 2a82c927ded2..295789d993b0 100644 >> --- a/drivers/usb/host/xhci-mem.c >> +++ b/drivers/usb/host/xhci-mem.c >> @@ -947,6 +947,11 @@ void xhci_free_virt_devices_depth_first(struct xhci_hcd *xhci, int slot_id) >> if (!vdev) >> return; >> >> + if (WARN_ON(!vdev->real_port)) { >> + xhci_warn(xhci, "Bad vdev->real_port\n"); > > Why warn twice? What will that help? > > thanks, > > greg k-h > > . > I will fix that and send patch V2. Thanks! Best regards Yu Chen