2017-09-02 1:14 GMT+08:00 Paolo Valente <paolo.vale...@linaro.org>:
>
>> Il giorno 30 ago 2017, alle ore 20:42, Bart Van Assche 
>> <bart.vanass...@wdc.com> ha scritto:
>>
>> Make sysfs writes fail for invalid numbers instead of storing
>> uninitialized data copied from the stack. This patch removes
>> all uninitialized_var() occurrences from the BFQ source code.
>>
>> Signed-off-by: Bart Van Assche <bart.vanass...@wdc.com>
>> Cc: Paolo Valente <paolo.vale...@linaro.org>
>
> Acked-by: Paolo Valente <paolo.vale...@linaro.org>
>

Hi Bart,

how about using simple_strtoul  which was used in cfq/mq-iosched.c
*var = simple_strtoul(p, &p, 10);

if invalid string came from sysfs, this function just return 0,
and there are validations after every calling bfq_var_store.

Thanks

Reply via email to