diff options
author | Shiju Jose <[email protected]> | 2020-08-27 15:04:50 +0100 |
---|---|---|
committer | Borislav Petkov <[email protected]> | 2020-08-27 18:04:07 +0200 |
commit | b972fdba8665d75109ade0357739f46af6415d2a (patch) | |
tree | ad189170d20c38c531ffbaa84f8a7c94b5fe2f70 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | d012a7190fc1fd72ed48911e77ca97ba4521bccd (diff) |
EDAC/ghes: Fix NULL pointer dereference in ghes_edac_register()
After
b9cae27728d1 ("EDAC/ghes: Scan the system once on driver init")
and with CONFIG_DEBUG_TEST_DRIVER_REMOVE enabled, ghes_hw.dimms becomes
a NULL pointer after the second ->probe() (aka ghes_edac_register())
which the config option causes to be called.
This happens because the static variable which holds down whether
the system has been scanned already, doesn't get reset in
ghes_edac_unregister(). Then, on the second probe, ghes_scan_system()
doesn't get to enumerate the DIMMs, leading to ghes_hw.dimms remaining
NULL.
Clear the variable and rename it to something more descriptive so that a
second probe succeeds.
[ bp: Rewrite commit message. ]
Fixes: b9cae27728d1 ("EDAC/ghes: Scan the system once on driver init")
Suggested-by: Borislav Petkov <[email protected]>
Signed-off-by: Shiju Jose <[email protected]>
Signed-off-by: Borislav Petkov <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions