diff options
author | Jason Gunthorpe <jgg@nvidia.com> | 2020-08-31 12:28:12 -0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2020-08-31 12:28:12 -0300 |
commit | 6989aa62d342d79d447a9af12477b907d211bebe (patch) | |
tree | 09722ffca5dea6933dec72691f89a8cb09f78656 /drivers/edac/ghes_edac.c | |
parent | RDMA/rxe: Address an issue with hardened user copy (diff) | |
parent | Linux 5.9-rc3 (diff) | |
download | linux-dev-6989aa62d342d79d447a9af12477b907d211bebe.tar.xz linux-dev-6989aa62d342d79d447a9af12477b907d211bebe.zip |
Merge tag 'v5.9-rc3' into rdma.git for-next
Required due to dependencies in following patches.
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/edac/ghes_edac.c')
-rw-r--r-- | drivers/edac/ghes_edac.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/edac/ghes_edac.c b/drivers/edac/ghes_edac.c index da60c29468a7..54ebc8afc6b1 100644 --- a/drivers/edac/ghes_edac.c +++ b/drivers/edac/ghes_edac.c @@ -55,6 +55,8 @@ static DEFINE_SPINLOCK(ghes_lock); static bool __read_mostly force_load; module_param(force_load, bool, 0); +static bool system_scanned; + /* Memory Device - Type 17 of SMBIOS spec */ struct memdev_dmi_entry { u8 type; @@ -225,14 +227,12 @@ static void enumerate_dimms(const struct dmi_header *dh, void *arg) static void ghes_scan_system(void) { - static bool scanned; - - if (scanned) + if (system_scanned) return; dmi_walk(enumerate_dimms, &ghes_hw); - scanned = true; + system_scanned = true; } void ghes_edac_report_mem_error(int sev, struct cper_sec_mem_err *mem_err) @@ -631,6 +631,8 @@ void ghes_edac_unregister(struct ghes *ghes) mutex_lock(&ghes_reg_mutex); + system_scanned = false; + if (!refcount_dec_and_test(&ghes_refcount)) goto unlock; |