Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp4066559ybf; Tue, 3 Mar 2020 19:17:01 -0800 (PST) X-Google-Smtp-Source: ADFU+vvFM8ntMFWjTmDRrUnYL7usyupaIHt1C4Ig+XP1LIrpiYirLvTYf+XEWT+Uv9F+ro1yLTO7 X-Received: by 2002:aca:4b93:: with SMTP id y141mr437599oia.18.1583291821125; Tue, 03 Mar 2020 19:17:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583291821; cv=none; d=google.com; s=arc-20160816; b=wTAqjAdTsr2vVPR67ugmjcrGp8Q/zu5U5LXPTJWmSd5eKCMAHp9XjAbNHfzn+85UyI IHg28WaTMzTtvgfLNQN+0zFmcr420UfmC3suK9e6QbIZkdDky8sRNQtbQSX43ne75eI8 X/MOYHnVzlsX/HfljmXVnTe0woBZ6ghr1rzzcMdhARLGA7PY5RKUU6EnRB955QQXSAg+ 5lJh1Z3RNd/rONICTe6elGil/uzIr16prcI06/+1b1dSTeJIsgspFfDU4FgnrKLJcvYa zWdiYiRuWvRNQEWCZz//J7+sWxAW0QMhkCaYg46pHfHkv6og1ffUcCp4hu+g7pt9sb2+ ZHwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=3ZD5MsYu656KMRNrDoSsh6O5TBQomSaNiA5g4AqhbdY=; b=1H22B1XpjQ1Exglc+FR37jXXvdAZifx0Am6ybtOanQFNC+BkD7z5UF4NOxOAFKVEEY 6bHEZhBaqB8A84mqDlOIgytS0D4USg296ntTHRIV12+BkbgO/f4NhshEHFi07GB+qJzb jrQbd3nYYr8KU8tvgjh+oDgIDxGRi+xetglxDyLiul76AAedS6t4eKz2mm399VtrusMM L9QELZFoRM1WTe7GGk2oidhDfa1B3+HV7jx1Y03Y+McLhgApx+7JKzDjkHq7tqQeNBP/ Kz4RMHglgw7uuqtB7HNl5XeFprEpMdawCMacVv7uXCvsUI0UXl7tDIK7OtZWpw61Pu8G KoNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=kSjlAehl; 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=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w5si303337otq.238.2020.03.03.19.16.49; Tue, 03 Mar 2020 19:17:01 -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=@mediatek.com header.s=dk header.b=kSjlAehl; 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=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387643AbgCDDQZ (ORCPT + 99 others); Tue, 3 Mar 2020 22:16:25 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:39647 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2387595AbgCDDQZ (ORCPT ); Tue, 3 Mar 2020 22:16:25 -0500 X-UUID: 0d74a16f8159421595eecd9bcf402b15-20200304 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:CC:To:From:Subject:Message-ID; bh=3ZD5MsYu656KMRNrDoSsh6O5TBQomSaNiA5g4AqhbdY=; b=kSjlAehl7DXtE6MpOBytzOBRqN4GuuusYy5Pl2/Ws0eM5esMdOOheZPtkLbct6Q9hrKK+WhxbNe94Tl35cLNJuQ9ySF+a7KumzN5MuuPpxQvs4T8zb15Jzd8iQftxj/7BEDEzN3Jttty/42SD8kZsr/0ewd9diIYFbjzBFqJYCs=; X-UUID: 0d74a16f8159421595eecd9bcf402b15-20200304 Received: from mtkcas07.mediatek.inc [(172.21.101.84)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1411949230; Wed, 04 Mar 2020 11:16:17 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 4 Mar 2020 11:15:20 +0800 Received: from [172.21.77.33] (172.21.77.33) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Wed, 4 Mar 2020 11:13:44 +0800 Message-ID: <1583291775.12083.59.camel@mtkswgap22> Subject: Re: [PATCH] xhci-mtk: Fix NULL pointer dereference with xhci_irq() for shared_hcd From: Macpaul Lin To: Mathias Nyman CC: Mathias Nyman , Greg Kroah-Hartman , Matthias Brugger , "linux-usb@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-mediatek@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Chunfeng Yun =?UTF-8?Q?=28=E4=BA=91=E6=98=A5=E5=B3=B0=29?= , wsd_upstream , Sriharsha Allenki Date: Wed, 4 Mar 2020 11:16:15 +0800 In-Reply-To: <39ec1610-1686-6509-02ac-6e73d8be2453@linux.intel.com> References: <1579246910-22736-1-git-send-email-macpaul.lin@mediatek.com> <08f69bab-2ada-d6ab-7bf7-d960e9f148a0@linux.intel.com> <1580556039.10835.3.camel@mtkswgap22> <39ec1610-1686-6509-02ac-6e73d8be2453@linux.intel.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 MIME-Version: 1.0 X-MTK: N Content-Transfer-Encoding: base64 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org T24gVHVlLCAyMDIwLTAyLTA0IGF0IDE3OjQ0ICswODAwLCBNYXRoaWFzIE55bWFuIHdyb3RlOg0K PiBPbiAxLjIuMjAyMCAxMy4yMCwgTWFjcGF1bCBMaW4gd3JvdGU6DQo+ID4gT24gRnJpLCAyMDIw LTAxLTMxIGF0IDE2OjUwICswMjAwLCBNYXRoaWFzIE55bWFuIHdyb3RlOg0KPiA+PiBPbiAxNy4x LjIwMjAgOS40MSwgTWFjcGF1bCBMaW4gd3JvdGU6DQo+ID4+PiBBY2NvcmRpbmcgdG8gTlVMTCBw b2ludGVyIGZpeDogaHR0cHM6Ly90aW55dXJsLmNvbS91cWZ0NXJhDQo+ID4+PiB4aGNpOiBGaXgg TlVMTCBwb2ludGVyIGRlcmVmZXJlbmNlIHdpdGggeGhjaV9pcnEoKSBmb3Igc2hhcmVkX2hjZA0K PiA+Pj4gVGhlIHNpbWlsYXIgaXNzdWUgaGFzIGFsc28gYmVlbiBmb3VuZCBpbiBRQyBhY3Rpdml0 aWVzIGluIE1lZGlhdGVrLg0KPiA+Pj4NCj4gPj4+IEhlcmUgcXVvdGUgdGhlIGRlc2NyaXB0aW9u IGZyb20gdGhlIHJlZmVyZW5jZWQgcGF0Y2ggYXMgZm9sbG93cy4NCj4gPj4+ICJDb21taXQgKCJm MDY4MDkwNDI2ZWEgeGhjaTogRml4IGxlYWtpbmcgVVNCMyBzaGFyZWRfaGNkDQo+ID4+PiBhdCB4 aGNpIHJlbW92YWwiKSBzZXRzIHhoY2lfc2hhcmVkX2hjZCB0byBOVUxMIHdpdGhvdXQNCj4gPj4+ IHN0b3BwaW5nIHhoY2kgaG9zdC4gVGhpcyByZXN1bHRzIGludG8gYSByYWNlIGNvbmRpdGlvbg0K PiA+Pj4gd2hlcmUgc2hhcmVkX2hjZCAoc3VwZXIgc3BlZWQgcm9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