mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-07 20:58:14 -04:00
Merge tag 'edac_urgent_for_v5.9_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras
Pull EDAC fixes from Borislav Petkov:
"Two fixes for resulting from CONFIG_DEBUG_TEST_DRIVER_REMOVE=y
experiments:
- complete a previous fix to reset a local structure containing
scanned system data properly so that the driver rescans, as it
should, on a second load.
- address a refcount underflow due to not paying attention to the
driver whitelest on unregister"
* tag 'edac_urgent_for_v5.9_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras:
EDAC/ghes: Check whether the driver is on the safe list correctly
EDAC/ghes: Clear scanned data on unload
This commit is contained in:
@@ -508,6 +508,7 @@ int ghes_edac_register(struct ghes *ghes, struct device *dev)
|
||||
if (!force_load && idx < 0)
|
||||
return -ENODEV;
|
||||
} else {
|
||||
force_load = true;
|
||||
idx = 0;
|
||||
}
|
||||
|
||||
@@ -629,9 +630,13 @@ void ghes_edac_unregister(struct ghes *ghes)
|
||||
struct mem_ctl_info *mci;
|
||||
unsigned long flags;
|
||||
|
||||
if (!force_load)
|
||||
return;
|
||||
|
||||
mutex_lock(&ghes_reg_mutex);
|
||||
|
||||
system_scanned = false;
|
||||
memset(&ghes_hw, 0, sizeof(struct ghes_hw_desc));
|
||||
|
||||
if (!refcount_dec_and_test(&ghes_refcount))
|
||||
goto unlock;
|
||||
|
||||
Reference in New Issue
Block a user