linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] ext4: fixed ext4_calculate_overhead() bug.
       [not found] <1353544101-5154-1-git-send-email-vmartirosyan@linuxtesting.org>
@ 2012-11-28 17:45 ` Theodore Ts'o
  0 siblings, 0 replies; only message in thread
From: Theodore Ts'o @ 2012-11-28 17:45 UTC (permalink / raw)
  To: Vahram Martirosyan
  Cc: Vahram Martirosyan, Andreas Dilger, linux-ext4, linux-kernel

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-11-28 17:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1353544101-5154-1-git-send-email-vmartirosyan@linuxtesting.org>
2012-11-28 17:45 ` [PATCH] ext4: fixed ext4_calculate_overhead() bug Theodore Ts'o

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).