Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp661313imu; Fri, 25 Jan 2019 08:44:51 -0800 (PST) X-Google-Smtp-Source: ALg8bN7c9nLO0gDgjU02OCyKedWxiZbJEXcuJ7V3Xw3fGJ6nYmnXBoidPhHUlvs2ThpkSPjat7Es X-Received: by 2002:a63:4566:: with SMTP id u38mr10528187pgk.4.1548434691083; Fri, 25 Jan 2019 08:44:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548434691; cv=none; d=google.com; s=arc-20160816; b=Y6XhmR5xBO/NcpZX6uL9oTROjlZo1F783r1Y9KvF3s/gyYmyWNA8IlmbAMgeZt37id PPfaSsmDwDVbiTbEdWrEPnL3sPbRHUKXWRJsawyKGDn3DPjnPP/zMuVLIQ81+vvaBgjA r+302hbjtOprK/DhV3246aE1X/v+U8IPdzKct6y/QGHxfQRoFo3XXXUHMi5BxlnpXGQf CZWHu+JUE8B0viTn+DtZaKIH2Mk6uo1veguy9CLzW7PkcTjjYC34U8dti9zaVF0VG8Sm F1XEtB9MEdU0reZZY9DfH/FOVaOoQQuEbnlD2/wayAVrMyr3C8GLx+OXkod7V0hYxYU6 n/aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature; bh=2xuWbti2TkwBGgOARo7CTytDNC7Lc7rfcuxG70oI0ZY=; b=zSrvMG15C9t/EMadhCa4z+vaxmjdUyLgrsV8Tw5sbWl1FTTCmgflBoKKz0LFmxi3Hw v0iswwHrPFLlSIf82tSx1dpnrUhk4m5O7fQBdo9/JgvN3+oxiw+gspKVfZJVYL5cUcfE 04KS+FVifGBDNG6t5CX0TghshwvjZQ/O8o1FyOmrReHDoCqQ8fS1VpqrTwN5MyKXYiXZ dOE/YjNIwd2wG3jKF2CeGn6rImET5iwOaH121bVhRga3DmsWw0S5hQFxTguc+NiLpokO AQsGLk3/HtXTml73JNGqJh4dvh4k9tLM/YgjD3JFjXBb6Y1jl/TPxpY9Jf6cDsk6vB7z q3hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=kXV8zZyu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q8si3730367pli.284.2019.01.25.08.44.34; Fri, 25 Jan 2019 08:44:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=kXV8zZyu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726798AbfAYQoO (ORCPT + 99 others); Fri, 25 Jan 2019 11:44:14 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:38448 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726321AbfAYQoO (ORCPT ); Fri, 25 Jan 2019 11:44:14 -0500 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id x0PGiC9O125814; Fri, 25 Jan 2019 10:44:12 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1548434652; bh=2xuWbti2TkwBGgOARo7CTytDNC7Lc7rfcuxG70oI0ZY=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=kXV8zZyuZu0/ewU9J8ilVr1Pd2XGnRBYxSQxKdNXm0NedruQHKmM92i9J+6HJDO90 nZg1OIA0tAE9zqrhSWcMWL88q4rCdnE/CBVKrrcz3StMkL4BIzqJHEPef8MQmd9Ngd kT/9/Zxk+EZlEjguiEc9RTzVXMGD+TwVnUBcWZng= Received: from DFLE105.ent.ti.com (dfle105.ent.ti.com [10.64.6.26]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x0PGiCc7121793 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 25 Jan 2019 10:44:12 -0600 Received: from DFLE101.ent.ti.com (10.64.6.22) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Fri, 25 Jan 2019 10:44:12 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE101.ent.ti.com (10.64.6.22) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1591.10 via Frontend Transport; Fri, 25 Jan 2019 10:44:11 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id x0PGiCK4012367; Fri, 25 Jan 2019 10:44:12 -0600 Date: Fri, 25 Jan 2019 10:44:12 -0600 From: Bin Liu To: "Matwey V. Kornilov" CC: Greg Kroah-Hartman , "open list:MUSB MULTIPOINT HIGH SPEED DUAL-ROLE CONTROLLER" , open list Subject: Re: [PATCH] usb: musb: Fix potential NULL dereference Message-ID: <20190125164412.GJ18982@uda0271908> Mail-Followup-To: Bin Liu , "Matwey V. Kornilov" , Greg Kroah-Hartman , "open list:MUSB MULTIPOINT HIGH SPEED DUAL-ROLE CONTROLLER" , open list References: <20190123175142.12604-1-matwey@sai.msu.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 24, 2019 at 09:47:02PM +0300, Matwey V. Kornilov wrote: > By the way, why do we need to store the qh in urb->hcpriv? > qh can always be accessible through urb->ep->hcpriv > Wouldn't it be better to drop entire urb->hcpriv usage? I am not sure why. The code is there since the first commit in a decade ago. But I tend to agree with you. In a quick search for urb->hcpriv and urb->ep->hcpriv, based on the usage in core/hcd.c, it seems to me that urb->hcpriv should not be changed in each controller driver, but I see both have been used in most controller drivers. I will leave this to others to educate me. Regards, -Bin.