diff options
author | Borislav Petkov <bp@suse.de> | 2016-06-16 19:13:49 +0200 |
---|---|---|
committer | Sasha Levin <alexander.levin@verizon.com> | 2016-07-19 18:20:16 -0400 |
commit | 82736d510a43d7362f0899f7cc61429f0b342647 (patch) | |
tree | 5724a1c959f4a56c7c71fc0afead08c7b76a8d32 /block | |
parent | fa48403aa5c34a02e39f17d08cfd1da134205928 (diff) | |
download | linux-stable-82736d510a43d7362f0899f7cc61429f0b342647.tar.gz linux-stable-82736d510a43d7362f0899f7cc61429f0b342647.tar.bz2 linux-stable-82736d510a43d7362f0899f7cc61429f0b342647.zip |
x86/amd_nb: Fix boot crash on non-AMD systems
[ Upstream commit 1ead852dd88779eda12cb09cc894a03d9abfe1ec ]
Fix boot crash that triggers if this driver is built into a kernel and
run on non-AMD systems.
AMD northbridges users call amd_cache_northbridges() and it returns
a negative value to signal that we weren't able to cache/detect any
northbridges on the system.
At least, it should do so as all its callers expect it to do so. But it
does return a negative value only when kmalloc() fails.
Fix it to return -ENODEV if there are no NBs cached as otherwise, amd_nb
users like amd64_edac, for example, which relies on it to know whether
it should load or not, gets loaded on systems like Intel Xeons where it
shouldn't.
Reported-and-tested-by: Tony Battersby <tonyb@cybernetics.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: <stable@vger.kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1466097230-5333-2-git-send-email-bp@alien8.de
Link: https://lkml.kernel.org/r/5761BEB0.9000807@cybernetics.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Diffstat (limited to 'block')
0 files changed, 0 insertions, 0 deletions