Hi Jovi,

[SNIP]

On Tue, 3 Sep 2013 19:10:04 +0800, zhangwei wrote:
>> +    if (atomic_inc_return(&uprobe_buffer_ref) == 1) {
>> +            int cpu;
>> +
>> +            uprobe_cpu_buffer = __alloc_percpu(PAGE_SIZE, PAGE_SIZE);
>> +            if (uprobe_cpu_buffer == NULL)
>> +                    return -ENOMEM;
>> +
>
> Do we need add atomic_dec if allocate percpu buffer failed?

Good catch!  I'll fix it. :)

Thanks,
Namhyung


>
>> +            for_each_possible_cpu(cpu)
>> +                    mutex_init(&per_cpu(uprobe_cpu_mutex, cpu));
>> +    }
>> +
>>      WARN_ON(!uprobe_filter_is_empty(&tu->filter));
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to