if (n < HBP_NUM) {
- struct perf_event *bp = thread->ptrace_bps[n];
-+ index = array_index_nospec(index, HBP_NUM);
+ struct perf_event *bp = thread->ptrace_bps[index];
++ index = array_index_nospec(index, HBP_NUM);
if (bp)
val = bp->hw.info.address;
if (n < HBP_NUM) {
- struct perf_event *bp = thread->ptrace_bps[n];
-+ index = array_index_nospec(index, HBP_NUM);
+ struct perf_event *bp = thread->ptrace_bps[index];
++ index = array_index_nospec(index, HBP_NUM);
if (bp)
val = bp->hw.info.address;
if (n < HBP_NUM) {
- struct perf_event *bp = thread->ptrace_bps[n];
-+ index = array_index_nospec(index, HBP_NUM);
+ struct perf_event *bp = thread->ptrace_bps[index];
++ index = array_index_nospec(index, HBP_NUM);
if (bp)
val = bp->hw.info.address;
if (n < HBP_NUM) {
- struct perf_event *bp = thread->ptrace_bps[n];
-+ index = array_index_nospec(index, HBP_NUM);
+ struct perf_event *bp = thread->ptrace_bps[index];
++ index = array_index_nospec(index, HBP_NUM);
if (bp)
val = bp->hw.info.address;
if (n < HBP_NUM) {
- struct perf_event *bp = thread->ptrace_bps[n];
-+ index = array_index_nospec(index, HBP_NUM);
+ struct perf_event *bp = thread->ptrace_bps[index];
++ index = array_index_nospec(index, HBP_NUM);
if (bp)
val = bp->hw.info.address;
if (n < HBP_NUM) {
- struct perf_event *bp = thread->ptrace_bps[n];
-+ index = array_index_nospec(index, HBP_NUM);
+ struct perf_event *bp = thread->ptrace_bps[index];
++ index = array_index_nospec(index, HBP_NUM);
if (bp)
val = bp->hw.info.address;