linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Dan Carpenter <dan.carpenter@oracle.com>, Christoph Hellwig <hch@lst.de>
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 1/2] ataflop: potential out of bounds in do_format()
Date: Wed, 21 Apr 2021 09:15:52 -0600	[thread overview]
Message-ID: <3f79a1f7-8b7c-420c-0e70-d3b5880222bf@kernel.dk> (raw)
In-Reply-To: <YH/7+65JruUO/wsg@mwanda>

On 4/21/21 4:18 AM, Dan Carpenter wrote:
> The function uses "type" as an array index:
> 
> 	q = unit[drive].disk[type]->queue;
> 
> Unfortunately the bounds check on "type" isn't done until later in the
> function.  Fix this by moving the bounds check to the start.

Applied this and 2/2, thanks Dan.

-- 
Jens Axboe


      parent reply	other threads:[~2021-04-21 15:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-21 10:18 [PATCH 1/2] ataflop: potential out of bounds in do_format() Dan Carpenter
2021-04-21 10:19 ` [PATCH 2/2] ataflop: fix off by one in ataflop_probe() Dan Carpenter
2021-04-21 14:23   ` Christoph Hellwig
2021-04-21 14:22 ` [PATCH 1/2] ataflop: potential out of bounds in do_format() Christoph Hellwig
2021-04-21 15:15 ` Jens Axboe [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=3f79a1f7-8b7c-420c-0e70-d3b5880222bf@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=dan.carpenter@oracle.com \
    --cc=hch@lst.de \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).