Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758211AbcJQWOI (ORCPT ); Mon, 17 Oct 2016 18:14:08 -0400 Received: from mail-db5eur01on0043.outbound.protection.outlook.com ([104.47.2.43]:33568 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754465AbcJQWN7 (ORCPT ); Mon, 17 Oct 2016 18:13:59 -0400 From: Roy Zang To: Leo Li , Bjorn Helgaas , "Minghuan Lian" , Mingkai Hu , Roy Zang CC: "linux-pci@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Stuart Yoder Subject: Re: [PATCH] PCI: layerscape: Fix kernel panic on accessing NULL pointer Thread-Topic: [PATCH] PCI: layerscape: Fix kernel panic on accessing NULL pointer Thread-Index: AQHSKMB2naQirP2PYEyr7LTotThEIg== Date: Mon, 17 Oct 2016 21:58:19 +0000 Message-ID: References: <1476740647-11155-1-git-send-email-leoyang.li@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=roy.zang@nxp.com; x-originating-ip: [192.88.168.50] x-ms-office365-filtering-correlation-id: 56c21e7e-6290-48ab-2586-08d3f6d8b52b x-microsoft-exchange-diagnostics: 1;DB4PR04MB0784;7:zGhszKt0AXivWuYz/43VHcKJqx0FNBuso2Ke+qO/3+CCxJndNsi+pO2fiEr/Xgy5Q6euCg3HnVqWlErYzs5TgMXKuhuTqCOCecCBNCPkKj2xsZhZS+QGwOXIMUeFCPMZ/L9rOsDJS1loxxNUnZPcWQt7DVB63v8piawMCUe4UjPjLKi2+zSqgeoGHK3zYNIHPbAIV7eRxNcybbSl4rCoi1EzJLMv38Ro6rtXt8lmkth1sEHePvyapg6/e0jkHTEz7AnoCGdePxajnh9uKMfJF+q/jhYYRaFsox1FA8gcUoeFumPiWp99qkLSbC83tkjjVfEe609uvgHhLYZ6457kyDVJqYGu7lVbtw4YgrVO4ro= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DB4PR04MB0784; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(185117386973197); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6055026);SRVR:DB4PR04MB0784;BCL:0;PCL:0;RULEID:;SRVR:DB4PR04MB0784; x-forefront-prvs: 0098BA6C6C x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(7916002)(189002)(24454002)(199003)(377454003)(50986999)(3846002)(7736002)(76576001)(6116002)(102836003)(105586002)(5001770100001)(106356001)(97736004)(106116001)(122556002)(19580395003)(19580405001)(5660300001)(3280700002)(54356999)(7846002)(76176999)(10400500002)(74316002)(305945005)(7696004)(101416001)(33656002)(6862003)(8936002)(189998001)(5002640100001)(4326007)(81156014)(87936001)(81166006)(9686002)(66066001)(92566002)(2906002)(11100500001)(2900100001)(77096005)(586003)(3660700001)(8676002)(86362001)(68736007);DIR:OUT;SFP:1101;SCL:1;SRVR:DB4PR04MB0784;H:HE1PR0402MB2748.eurprd04.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Oct 2016 21:58:19.9312 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB4PR04MB0784 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id u9HMEBQP006443 Content-Length: 383 Lines: 13 On 10/17/2016 04:50 PM, Li Yang wrote: > Commit fefe6733e added reference to the pcie->drvdata before it is > initialized which causes a kernel panic. Fix the problem by > initializing the pcie->drvdata earlier before it is used. > > Reported-by: Stuart Yoder > Signed-off-by: Li Yang > --- Acked-by: Roy Zang Roy