diff options
author | James Hogan <[email protected]> | 2017-02-10 22:44:03 +0000 |
---|---|---|
committer | James Hogan <[email protected]> | 2017-02-13 18:57:34 +0000 |
commit | 4828b5f56f9596f014567ceef0e5c200fb582e13 (patch) | |
tree | 4dcad3dc8b9382b4fea9f9cdcaf53c5890822de9 /tools/perf/scripts/python/call-graph-from-postgresql.py | |
parent | f229454d34e000e714280e767811304e29d96bea (diff) |
MIPS: Fix cacheinfo overflow
The recently added MIPS cacheinfo support used a macro populate_cache()
to populate the cacheinfo structures depending on which caches are
present. However the macro contains multiple statements without
enclosing them in a do {} while (0) loop, so the L2 and L3 cache
conditionals in populate_cache_leaves() only conditionalised the first
statement in the macro.
This overflows the buffer allocated by detect_cache_attributes(),
resulting in boot failures under QEMU where neither the L2 or L2 caches
are present.
Enclose the macro statements in a do {} while (0) block to keep the
whole macro inside the conditionals.
Fixes: ef462f3b64e9 ("MIPS: Add cacheinfo support")
Reported-by: Guenter Roeck <[email protected]>
Signed-off-by: James Hogan <[email protected]>
Tested-by: Guenter Roeck <[email protected]>
Cc: Ralf Baechle <[email protected]>
Cc: Justin Chen <[email protected]>
Cc: Florian Fainelli <[email protected]>
Cc: [email protected]
Cc: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/15276/
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-postgresql.py')
0 files changed, 0 insertions, 0 deletions