All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Eric Gouriou <egouriou@google.com>
Cc: Zhu Yanhai <zhu.yanhai@gmail.com>,
	Yu-Ju Hong <yuju.hong@gmail.com>,
	fio@vger.kernel.org, Nauman Rafique <nauman@google.com>
Subject: Re: [PATCH] stats: fix io_u_plat out-of-bound accesses (round 2)
Date: Tue, 16 Aug 2011 08:38:33 +0200	[thread overview]
Message-ID: <4E4A1069.606@kernel.dk> (raw)
In-Reply-To: <1313450590-22069-1-git-send-email-egouriou@google.com>

On 2011-08-16 01:23, Eric Gouriou wrote:
> Commit 833491908a1afd67 introduced the ability to report completion
> latency percentiles. It also caused a memory corruption when running
> with multiple threads due to out of bound accesses in show_run_stats().
> The major index of the io_u_plat two-dimensional array is meant
> to be DDIR_ value in {DDIR_READ, DDIR_WRITE} (i.e., {0, 1}). The
> code in show_run_stats() incorrectly wrote into the array using
> a major index with values {0, 1, 2}. Commit 0a0b49007cbce8d1 fixed
> the out of bound accesses by increasing the size of the major
> dimension of the io_u_plat array from 2 to 3.
> 
> This patch reverts the size change from 0a0b49007cbce8d1 in favor
> of avoiding the out-of-bound accesses in show_run_stats().

This makes more sense, I didn't look carefully enough at this, the 3rd
index is usually for trim.

> Jens, Zhu,
> 
> Yu-Ju is unlikely to be checking fio email traffic this week,
> hence my follow-up. The error was introduced while porting
> the patch between different versions of fio. The internal version
> was tested appropriately but not the upstream version.
> 
> Apologies for the trouble.

No worries, thanks for following up on this so quickly. My group replies
bounced on Yu-Ju's email.

-- 
Jens Axboe


  reply	other threads:[~2011-08-16  6:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-15 23:23 [PATCH] stats: fix io_u_plat out-of-bound accesses (round 2) Eric Gouriou
2011-08-16  6:38 ` Jens Axboe [this message]
2011-08-22 17:04   ` Yu-Ju Hong

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=4E4A1069.606@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=egouriou@google.com \
    --cc=fio@vger.kernel.org \
    --cc=nauman@google.com \
    --cc=yuju.hong@gmail.com \
    --cc=zhu.yanhai@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.