mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jeff Moyer <jmoyer@redhat.com>
To: Andi Kleen <ak@linux.intel.com>
Cc: Vivek Goyal <vgoyal@redhat.com>, Jens Axboe <axboe@kernel.dk>,
	Andi Kleen <andi@firstfloor.org>,
	torvalds@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Fix array overflow in CFQ
Date: Thu, 21 Oct 2010 13:15:03 -0400	[thread overview]
Message-ID: <x49bp6n1n8o.fsf@segfault.boston.devel.redhat.com> (raw)
In-Reply-To: <20101021171600.GA6277@gargoyle.fritz.box> (Andi Kleen's message of "Thu, 21 Oct 2010 19:16:00 +0200")

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

      reply	other threads:[~2010-10-21 17:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-19  9:10 Andi Kleen
2010-10-19 10:01 ` Jens Axboe
2010-10-19 11:49   ` Vivek Goyal
2010-10-19 11:55     ` Jens Axboe
2010-10-19 12:33     ` Vivek Goyal
2010-10-19 13:23       ` Andi Kleen
2010-10-19 15:05         ` Vivek Goyal
2010-10-21 16:53           ` Jeff Moyer
2010-10-21 17:16             ` Andi Kleen
2010-10-21 17:15               ` Jeff Moyer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=x49bp6n1n8o.fsf@segfault.boston.devel.redhat.com \
    --to=jmoyer@redhat.com \
    --cc=ak@linux.intel.com \
    --cc=andi@firstfloor.org \
    --cc=axboe@kernel.dk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=vgoyal@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®