lkml.org 
[lkml]   [2010]   [Oct]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] Fix array overflow in CFQ
Date
Andi Kleen <ak@linux.intel.com> writes:

>> > Agreed.
>> >
>> > Jens, do you want me to regenerate your patch so that we increase the
>> > size of ->busy_queues_avg[CFQ_PRIO_NR] but not ->service_trees[][].
>>
>> Just be sure to put a huge comment in there so you don't confuse the
>> poor masses trying to make sense of the code.
>
> Right now the code is confusing, with a correctly sized array it would
> be completely straight forward.

That's not entirely true. You want a comment to state that the array
size is adjusted to ensure no accidental overflows, but in reality, that
third bucket is never used.

Cheers,
Jeff


\
 
 \ /
  Last update: 2010-10-21 19:21    [W:0.042 / U:0.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site