lkml.org 
[lkml]   [2017]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH V2 11/16] block, bfq: reduce idling only in symmetric scenarios
From
Date

> Il giorno 31 mar 2017, alle ore 17:20, Bart Van Assche <bart.vanassche@sandisk.com> ha scritto:
>
> On Fri, 2017-03-31 at 14:47 +0200, Paolo Valente wrote:
>> + entity->weight_counter = kzalloc(sizeof(struct bfq_weight_counter),
>> + GFP_ATOMIC);
>> + entity->weight_counter->weight = entity->weight;
>
> GFP_ATOMIC allocations are more likely to fail than GFP_KERNEL allocations.
> What will happen if kzalloc() returns NULL?
>

A plain crash :( I'm adding the simple handling of this forgotten exception. If I don't get other reviews in the next days, I'll post a V3 addressing this and the other issue you highlighted.

Thanks,
Paolo

> Bart.

\
 
 \ /
  Last update: 2017-04-07 09:49    [W:0.027 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site