diff options
author | Alexey Klimov <[email protected]> | 2015-12-10 17:28:37 +0000 |
---|---|---|
committer | Jassi Brar <[email protected]> | 2016-02-02 16:39:13 +0530 |
commit | e9c8dc8ba96b165ae72daad3b1f27823c3aee628 (patch) | |
tree | fa2a6b0a43b5c56c1faf09f1068acc5cbc0457b0 /tools/perf/util/scripting-engines/trace-event-python.c | |
parent | 34229b277480f46c1e9a19f027f30b074512e68b (diff) |
mailbox: pcc: fix channel calculation in get_pcc_channel()
This patch fixes the calculation of pcc_chan for non-zero id.
After the compiler ignores the (unsigned long) cast the
pcc_mbox_channels pointer is type-cast and then the type-cast
offset is added which results in address outside of the range
leading to the kernel crashing.
We might add braces and make it:
pcc_chan = (struct mbox_chan *)
((unsigned long) pcc_mbox_channels +
(id * sizeof(*pcc_chan)));
but let's go with array approach here and use id as index.
Tested on Juno board.
Signed-off-by: Alexey Klimov <[email protected]>
Acked-by: Sudeep Holla <[email protected]>
Acked-by: Ashwin Chaugule <[email protected]>
Signed-off-by: Jassi Brar <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions