public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: Manish Katiyar <mkatiyar@gmail.com>
Cc: ext4 <linux-ext4@vger.kernel.org>,
	"Theodore Ts'o" <tytso@mit.edu>,
	cmm@us.ibm.com
Subject: Re: [PATCH] : make sure the buffer head members are zeroed out before using them.
Date: Sun, 25 Jan 2009 11:01:55 -0600	[thread overview]
Message-ID: <497C9B03.4080008@redhat.com> (raw)
In-Reply-To: <ea11fea30901250822n7b1e9c3ck1959d2e42e47ce76@mail.gmail.com>

Manish Katiyar wrote:
> On Sun, Jan 25, 2009 at 9:45 PM, Eric Sandeen <sandeen@redhat.com> wrote:
>> Manish Katiyar wrote:
>>> On Tue, Jan 20, 2009 at 10:36 PM, Manish Katiyar <mkatiyar@gmail.com> wrote:
>>>> ext2_quota_read doesn't bzeroes tmp_bh before calling ext2_get_block()
>>>> where we access the b_size of it. Since it is a local variable it
>>>> might contain some garbage. Make sure it is filled with zero before
>>>> passing.
>>> Hi Ted/mingming,
>>>
>>> Any feedback on this ??
>> This looks ok to me, Manish.  I'm curious, did you see this fail in real
>> life, and if so, what'd the failure look like?
> 
> Actually no......I realised this while going through the code. I was
> also wondering why we haven't hit this till now. Since ext{3,4} don't
> have this issue, the only reason I can think of is because ext2 with
> quota is not very much used or somehow we are lucky.
> 
>> With the change, the tmp_bh bh_size is 0, so maxblocks down the
>> get_block path is also 0, but I guess that works out ok.
> 
> Yes, but that is better than having a random garbage. Isn't it ?

Absolutely; it just struck me as a little odd but it's exactly what
__ext2_get_block does as well, I probably just need to take a closer
look at what it does w/ a 0 max.

-Eric

> Thanks -
> Manish


  reply	other threads:[~2009-01-25 17:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-20 17:06 [PATCH] : make sure the buffer head members are zeroed out before using them Manish Katiyar
2009-01-25 15:53 ` Manish Katiyar
2009-01-25 16:15   ` Eric Sandeen
2009-01-25 16:22     ` Manish Katiyar
2009-01-25 17:01       ` Eric Sandeen [this message]
2009-01-26 12:32       ` Jan Kara
2009-01-26 12:29   ` Jan Kara
2009-01-26 12:33     ` Manish Katiyar
2009-01-26 12:48       ` Manish Katiyar
2009-01-26 13:00         ` Jan Kara

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=497C9B03.4080008@redhat.com \
    --to=sandeen@redhat.com \
    --cc=cmm@us.ibm.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=mkatiyar@gmail.com \
    --cc=tytso@mit.edu \
    /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