aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/trace-event-scripting.c
diff options
context:
space:
mode:
authorAndrew Morton <[email protected]>2012-10-23 14:09:39 -0700
committerBorislav Petkov <[email protected]>2012-10-24 16:13:27 +0200
commit168bfeef7bba3f9784f7540b053e4ac72b769ce9 (patch)
treea02890616eb3d65377be628ff9cd1b577beb36df /tools/perf/util/trace-event-scripting.c
parent6f0c0580b70c89094b3422ba81118c7b959c7556 (diff)
amd64_edac:__amd64_set_scrub_rate(): avoid overindexing scrubrates[]
If none of the elements in scrubrates[] matches, this loop will cause __amd64_set_scrub_rate() to incorrectly use the n+1th element. As the function is designed to use the final scrubrates[] element in the case of no match, we can fix this bug by simply terminating the array search at the n-1th element. Boris: this code is fragile anyway, see here why: http://marc.info/?l=linux-kernel&m=135102834131236&w=2 It will be rewritten more robustly soonish. Reported-by: Denis Kirjanov <[email protected]> Cc: [email protected] Cc: Doug Thompson <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Borislav Petkov <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions