Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3628712pxk; Tue, 29 Sep 2020 01:52:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyNHfj+gu3y49gBDj6susA0cfsSgVsD42/G7rCCsdm54VrgcAHx+u8tZ9kQPo9MedMA/cI0 X-Received: by 2002:a17:906:7143:: with SMTP id z3mr2656535ejj.361.1601369554879; Tue, 29 Sep 2020 01:52:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601369554; cv=none; d=google.com; s=arc-20160816; b=JEehjTHeiozReRroaWVQgBhduVfRuNn64v2hrbvQzfEuO07ADfvw6htzcnPApEqeGc QdwKcGZHgdRNPXf+9MNMYNpPiYHiZwaxzGuiYzUjn9qhg2a4rFcHrVSA6SMhj9nhkZ+Y q6+/8KPmpmMpARo5iHsSSW7T9ANm3KX74AEWNbnMqVpW7Y+f1ax0GBvynA82sMwPdv0k Na4HA7qSvZZQWBCu+KwAE4V/IBBZ/+dyB8zVAaHeKJjCJYXRTbzJPJmW03BYtTrkkQwP bO5woOVeqWHQuqW2H4TLmGVXPJo3l6Sb3VCEDLENceGSXQ+S0WcGwLJ+f5XpibCu25HQ wYpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=MEpiy2le1q0f9Dg3iEhKfZ19Z50vWOd/F8DSuV1UndI=; b=DUWN5gUaAoXW9VX2cKb7Fq5ejbFXMFAatzlC0xxY6DIei5UEQrXWnhbddkxlqBud/G AVOj4uNNGoroqdr9TnhzIlI4mVrhtr9c/TgiudkubeZyDFC82TptjBxO+t8abYvASuhq hCEsVyC1H+91K19+mEE2Wm/v2Vboih+5IlIOOlmzZ7/OBSdwUqX79zECAspKKMAPS7z7 3oWwkYIKeEkQMXBRqOnEWE0werJYj67T2gNWRCmqnXF4ZYGGeJnI4FX6ddSgO/YUZE+N QTip9HpzwJn5rHt4+p4GwOcUgyk/SrC7SWiTO3UlDYab9UHUQxj5vhkxFK8UW1f0Q28b bm6g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o12si2403211edq.190.2020.09.29.01.52.11; Tue, 29 Sep 2020 01:52:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727663AbgI2IvO (ORCPT + 99 others); Tue, 29 Sep 2020 04:51:14 -0400 Received: from mga07.intel.com ([134.134.136.100]:44567 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725786AbgI2IvO (ORCPT ); Tue, 29 Sep 2020 04:51:14 -0400 IronPort-SDR: 3YeyJpOvCvfZxTsPJsIBFU7RGbxNlVsKMS+jTd0d3Iu/ZUXvkECNeXSEZ0cWOpjL8Zu8j/YKNP ZfIjKgqzqx3g== X-IronPort-AV: E=McAfee;i="6000,8403,9758"; a="226292884" X-IronPort-AV: E=Sophos;i="5.77,317,1596524400"; d="scan'208";a="226292884" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Sep 2020 01:51:13 -0700 IronPort-SDR: A9zOVNdreFCO6YB4HTLdxJvLJ9+LRqzWT8AkpMgnN0QKy4Zojqa8YYgh21NVNydBFRVAGhHDaZ IWgcbqyC2IfQ== X-IronPort-AV: E=Sophos;i="5.77,317,1596524400"; d="scan'208";a="514600857" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Sep 2020 01:51:10 -0700 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1kNBLl-002kT8-1s; Tue, 29 Sep 2020 11:51:05 +0300 Date: Tue, 29 Sep 2020 11:51:05 +0300 From: Andy Shevchenko To: Ethan Zhao Cc: Ethan Zhao , Bjorn Helgaas , Oliver , ruscur@russell.cc, Lukas Wunner , Stuart Hayes , Alexandru Gagniuc , Mika Westerberg , linux-pci , Linux Kernel Mailing List , "Jia, Pei P" Subject: Re: [PATCH 3/5] PCI/ERR: get device before call device driver to avoid null pointer reference Message-ID: <20200929085105.GA3956970@smile.fi.intel.com> References: <20200925023423.42675-1-haifeng.zhao@intel.com> <20200925023423.42675-4-haifeng.zhao@intel.com> <20200925123515.GF3956970@smile.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 29, 2020 at 10:35:14AM +0800, Ethan Zhao wrote: > Preferred style, there will be cleared comment in v6. Avoid top postings. > On Sat, Sep 26, 2020 at 12:42 AM Andy Shevchenko > wrote: > > > > On Thu, Sep 24, 2020 at 10:34:21PM -0400, Ethan Zhao wrote: > > > During DPC error injection test we found there is race condition between > > > pciehp and DPC driver, null pointer reference caused panic as following > > > > null -> NULL > > > > > > > > # setpci -s 64:02.0 0x196.w=000a > > > // 64:02.0 is rootport has DPC capability > > > # setpci -s 65:00.0 0x04.w=0544 > > > // 65:00.0 is NVMe SSD populated in above port > > > # mount /dev/nvme0n1p1 nvme > > > > > > (tested on stable 5.8 & ICX platform) > > > > > > Buffer I/O error on dev nvme0n1p1, logical block 468843328, > > > async page read > > > BUG: kernel NULL pointer dereference, address: 0000000000000050 > > > #PF: supervisor read access in kernel mode > > > #PF: error_code(0x0000) - not-present page > > > > Same comment about Oops. In another thread it was a good advice to move the full Oops (if you think it's very useful to have) after the cutter '---' line, so it will be in email archives but Git history. -- With Best Regards, Andy Shevchenko