linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Vahram Martirosyan <vmartirosyan@gmail.com>
Cc: Vahram Martirosyan <vmartirosyan@linuxtesting.org>,
	Andreas Dilger <adilger.kernel@dilger.ca>,
	linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ext4: fixed ext4_calculate_overhead() bug.
Date: Wed, 28 Nov 2012 12:45:15 -0500	[thread overview]
Message-ID: <20121128174515.GC24431@thunk.org> (raw)
In-Reply-To: <1353544101-5154-1-git-send-email-vmartirosyan@linuxtesting.org>

On Wed, Nov 21, 2012 at 04:28:21PM -0800, Vahram Martirosyan wrote:
> The memset operation before check brings to a BUG.
> No need to memset the page with zeroes.
> 
> The patch removes the memset call in ext4_calculate_overhead() function.
> 
> Found by the Spruce system in cooperation with the KEDR Framework.
> 
> Signed-off-by: Vahram Martirosyan <vmartirosyan@linuxtesting.org>

Applied, with a slightly rewritten commit description:

    ext4: fixed potential NULL dereference in ext4_calculate_overhead()
    
    The memset operation before check can cause a BUG if the memory
    allocation failed.  Since we are using get_zeroed_age, there is no
    need to use memset anyway.
    
    Found by the Spruce system in cooperation with the KEDR Framework.
    
    Signed-off-by: Vahram Martirosyan <vmartirosyan@linuxtesting.org>
    Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>

						- Ted

           reply	other threads:[~2012-11-28 17:45 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <1353544101-5154-1-git-send-email-vmartirosyan@linuxtesting.org>]

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=20121128174515.GC24431@thunk.org \
    --to=tytso@mit.edu \
    --cc=adilger.kernel@dilger.ca \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vmartirosyan@gmail.com \
    --cc=vmartirosyan@linuxtesting.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).