diff mbox series

[GIT,PULL] EDAC urgent for v5.9-rc3

Message ID 20200830070245.GB4363@zn.tnic (mailing list archive)
State New, archived
Headers show
Series [GIT,PULL] EDAC urgent for v5.9-rc3 | expand

Pull-request

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

Commit Message

Borislav Petkov Aug. 30, 2020, 7:02 a.m. UTC
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(-)

Comments

pr-tracker-bot@kernel.org Aug. 30, 2020, 7:15 p.m. UTC | #1
The pull request you sent on Sun, 30 Aug 2020 09:02:45 +0200:

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

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/42df60fcdfb8c02fa1800899cb33858e46efd587

Thank you!
diff mbox series

Patch

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;