Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp4237868rwo; Tue, 25 Jul 2023 03:00:30 -0700 (PDT) X-Google-Smtp-Source: APBJJlHncY+eIoye0nj43jQ3bzkUPW77Xu4IK/9QV1vxNsCkyTwy8Jl5Wf7r3DDdl+FnwyVWRUPd X-Received: by 2002:a05:6402:7c3:b0:522:37ca:a51c with SMTP id u3-20020a05640207c300b0052237caa51cmr3549244edy.40.1690279229911; Tue, 25 Jul 2023 03:00:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690279229; cv=none; d=google.com; s=arc-20160816; b=CwHsmwiNGvoE4AkeTvu/jeUc9RmqWAwKzyy6uVvYbF5EFnpGAHECDp+FOfhNl6+sT3 47qX6QTut0yG9N6nDCYlR4pwHOOpBxdWEf8UXcr/4unA6guBttM6Biam5QvNsInMKwOf 2QkqtgbPi3u0Cni8oHkAotHny57uLigNUL0dx8f6t/tT/gbFgHv0KYlAX+6CVKXt/5cn FYLd0p6GoKEN/jq3/hQfbVWEoWQYjlmk6eKEsZmrESgNA5v8biknZ7FizPotzD3DVod+ vbyuxnfltfr1rU2t44Skqf7KljvsrW5RLAKNvuVgcILX0ys7SOfyqG/ke1I1kd2H9wnd ENiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=6Uq4YzVOodlMvuoE0DYOcA3xnsOlWRYr+Uzf70yc5Y4=; fh=BV/4C7uCOp4C4XZ7gipyZUVNWjybPbng5rulmpdPFLw=; b=XOn4tDAwieh83uw6uNKBwXOWcg/3tJn1myfiV0H29PxZUDcfRvyv7r+NUC06TWaNLs 2/sK5NZIx6OjKvrs45pfAqiEqAKh/bFekQd2qpOnlpkoYJUK4CMNiRPtQU/ej/lP20QR HOPlWIsapB2HP3McEkzmtsQYNQaHujy+C0U8B3izjueELQtfTzP/V1GvojYQl7eJnLmD QINKzY+avZBgPlYYU5eHtPXPqWEykig6tNr8iiMd7+/ErDVACmajhtZmttih1+Bzuvc4 Du3Sqhog4HqoN6zw+oi3YTSj4DiEM4f/6We4jIST3ircMBUFb8Vei+yyHJ1Gq1suZeLf NjNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=QXRten4v; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v14-20020a056402184e00b0051e26de2e9dsi7534286edy.93.2023.07.25.03.00.05; Tue, 25 Jul 2023 03:00:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=QXRten4v; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231783AbjGYIGk (ORCPT + 99 others); Tue, 25 Jul 2023 04:06:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230164AbjGYIGi (ORCPT ); Tue, 25 Jul 2023 04:06:38 -0400 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EDC64116; Tue, 25 Jul 2023 01:06:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1690272397; x=1721808397; h=from:to:cc:subject:date:message-id; bh=nMTbfPgVcvacXEUWqJGCOueLTjOGIDiOh188sMtapls=; b=QXRten4v66Ez8U9ef1nDbRhFkJSmXU/4VaPhQE8pSZV3sK8oZTJfGQtM Y3KhpkEPbCWPX0F4/rk6sJAYUcLqrBrN4ZyQlycQAhhOmPTv1mEuU5qqZ vNfanIMaTuVPkS4EO0k6OUeMPfm8YniTmxv/rxmLOjZaJM9X6UZr1ijIp 1E1f+czoi/BX4KG68qFy8p+xv7AHdhe6IHDTs9L9ejirUjh+VJlMXlVFO ylmWyhZu+cI544AgvqeC2IHz/4O5oRs9a0wKZqppX/tQqxLm5xYdqXDHS CoXNhkqp4AVwh0EcLuzqqAKq/hj6Cr0E+rvsiReXNyvAxBv5dUtH8Axv7 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10781"; a="347258863" X-IronPort-AV: E=Sophos;i="6.01,230,1684825200"; d="scan'208";a="347258863" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jul 2023 01:06:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10781"; a="972570573" X-IronPort-AV: E=Sophos;i="6.01,230,1684825200"; d="scan'208";a="972570573" Received: from qiuxu-clx.sh.intel.com ([10.239.53.109]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jul 2023 01:06:25 -0700 From: Qiuxu Zhuo To: Tony Luck Cc: Qiuxu Zhuo , Borislav Petkov , Aristeu Rozanski , Mauro Carvalho Chehab , linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org, Ee Wey Lim Subject: [PATCH 1/1] EDAC/igen6: Fix the issue of no error events Date: Tue, 25 Jul 2023 16:04:27 +0800 Message-Id: <20230725080427.23883-1-qiuxu.zhuo@intel.com> X-Mailer: git-send-email 2.17.1 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Current igen6_edac checks for pending errors before the registration of the error handler. However, there is a possibility that the error occurs during the registration process, leading to unhandled pending errors and no future error events. This issue can be reproduced by repeatedly injecting errors during the loading of the igen6_edac. Fix this issue by moving the pending error handler after the registration of the error handler, ensuring that no pending errors are left unhandled. Fixes: 10590a9d4f23 ("EDAC/igen6: Add EDAC driver for Intel client SoCs using IBECC") Reported-by: Ee Wey Lim Tested-by: Ee Wey Lim Signed-off-by: Qiuxu Zhuo --- drivers/edac/igen6_edac.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/edac/igen6_edac.c b/drivers/edac/igen6_edac.c index 544dd19072ea..1a18693294db 100644 --- a/drivers/edac/igen6_edac.c +++ b/drivers/edac/igen6_edac.c @@ -27,7 +27,7 @@ #include "edac_mc.h" #include "edac_module.h" -#define IGEN6_REVISION "v2.5" +#define IGEN6_REVISION "v2.5.1" #define EDAC_MOD_STR "igen6_edac" #define IGEN6_NMI_NAME "igen6_ibecc" @@ -1216,9 +1216,6 @@ static int igen6_probe(struct pci_dev *pdev, const struct pci_device_id *ent) INIT_WORK(&ecclog_work, ecclog_work_cb); init_irq_work(&ecclog_irq_work, ecclog_irq_work_cb); - /* Check if any pending errors before registering the NMI handler */ - ecclog_handler(); - rc = register_err_handler(); if (rc) goto fail3; @@ -1230,6 +1227,9 @@ static int igen6_probe(struct pci_dev *pdev, const struct pci_device_id *ent) goto fail4; } + /* Check if any pending errors before/during the registration of the error handler */ + ecclog_handler(); + igen6_debug_setup(); return 0; fail4: -- 2.17.1