public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@nokia.com>
To: Dan Carpenter <error27@gmail.com>
Cc: Adrian Hunter <adrian.hunter@nokia.com>,
	linux-kernel@vger.kernel.org, Jens Axboe <axboe@kernel.dk>
Subject: Re: does "block: add secure discard" cause an overflow?
Date: Sat, 04 Sep 2010 09:41:30 +0300	[thread overview]
Message-ID: <4C81EA1A.1010100@nokia.com> (raw)
In-Reply-To: <20100903091631.GI5437@bicker>

Dan Carpenter wrote:
> This is the commit 8d57a98ccd0b44 "block: add secure discard".
> 
> The patch adds a letter 'E' to the string in blk_fill_rwbs().
>         if (rw & REQ_SECURE)
>                 rwbs[i++] = 'E';
> 
> The problem is that "rwbs" is a 6 character buffer and if all the flags
> are set the we'd get "WABSME" which would put us off the end (when you
> add the NUL terminator).

E goes with D which will not have either A or M, so there will not be
a rwbs with E that has more than 5 characters.

> 
> regards,
> dan carpenter
> 


      reply	other threads:[~2010-09-04  6:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-03  9:16 does "block: add secure discard" cause an overflow? Dan Carpenter
2010-09-04  6:41 ` Adrian Hunter [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=4C81EA1A.1010100@nokia.com \
    --to=adrian.hunter@nokia.com \
    --cc=axboe@kernel.dk \
    --cc=error27@gmail.com \
    --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