lkml.org 
[lkml]   [2020]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[GIT PULL] EDAC urgent for v5.9-rc3
Hi Linus,

please pull a single fix for the ghes_edac driver to properly clear
state on remove, when testing with CONFIG_DEBUG_TEST_DRIVER_REMOVE.

Thx.

---
The following changes since commit d012a7190fc1fd72ed48911e77ca97ba4521bccd:

Linux 5.9-rc2 (2020-08-23 14:08:43 -0700)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras.git tags/edac_urgent_for_v5.9_rc3

for you to fetch changes up to b972fdba8665d75109ade0357739f46af6415d2a:

EDAC/ghes: Fix NULL pointer dereference in ghes_edac_register() (2020-08-27 18:04:07 +0200)

----------------------------------------------------------------
A fix to properly clear ghes_edac driver state on driver remove so that
a subsequent load can probe the system properly; by Shiju Jose.

----------------------------------------------------------------
Shiju Jose (1):
EDAC/ghes: Fix NULL pointer dereference in ghes_edac_register()

drivers/edac/ghes_edac.c | 10 ++++++----
1 file 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;

--
Regards/Gruss,
Boris.

SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer, HRB 36809, AG Nürnberg

\
 
 \ /
  Last update: 2020-08-30 09:03    [W:0.044 / U:4.984 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site