On 12/18/18 6:31 PM, Steven Rostedt wrote:
> On Tue, 18 Dec 2018 17:46:36 +0100
> Daniel Bristot de Oliveira <bris...@redhat.com> wrote:
> 
>> +void text_poke_bp_batch(struct text_to_poke *tp, unsigned int nr_entries)
>> +{
>> +    unsigned int i;
>> +    unsigned char int3 = 0xcc;
>> +    int patched_all_but_first = 0;
>> +
>> +    bp_int3_tpv = tp;
>> +    bp_int3_tpv_nr = nr_entries;
>> +    bp_patching_in_progress = true;
>> +    /*
>> +     * Corresponding read barrier in int3 notifier for making sure the
>> +     * in_progress and handler are correctly ordered wrt. patching.
>> +     */
>> +    smp_wmb();
>> +
>> +    for (i = 0; i < nr_entries; i++)
>> +            text_poke_bp_set_handler(tp[i].addr, tp[i].handler, int3);
>> +
>> +    on_each_cpu(do_sync_core, NULL, 1);
>> +
>> +    for (i = 0; i < nr_entries; i++) {
>> +            if (tp->len - sizeof(int3) > 0) {
> Should this be:
> 
>               if (tp[i].len - sizeof(int3) > 0) {
> 
> ?

Ops! Missed that... you are right.

Fixing in the v3.

Thanks!

-- Daniel

Reply via email to