linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] e2fsck: free bh on csum verify error in do_one_pass
@ 2014-07-17 21:11 Eric Sandeen
  2014-07-18  9:04 ` Lukáš Czerner
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Sandeen @ 2014-07-17 21:11 UTC (permalink / raw)
  To: ext4 development

Coverity (re-)spotted this; it was triaged as a false positive,
but it seems pretty clear that the bh (which was just checked)
isn't currently freed before the function exits.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---

diff --git a/e2fsck/recovery.c b/e2fsck/recovery.c
index 54579c2..66d02b2 100644
--- a/e2fsck/recovery.c
+++ b/e2fsck/recovery.c
@@ -523,6 +523,7 @@ static int do_one_pass(journal_t *journal,
 			    !jbd2_descr_block_csum_verify(journal,
 							  bh->b_data)) {
 				err = -EIO;
+				brelse(bh);
 				goto failed;
 			}
 


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] e2fsck: free bh on csum verify error in do_one_pass
  2014-07-17 21:11 [PATCH] e2fsck: free bh on csum verify error in do_one_pass Eric Sandeen
@ 2014-07-18  9:04 ` Lukáš Czerner
  2014-07-22 16:31   ` Theodore Ts'o
  0 siblings, 1 reply; 3+ messages in thread
From: Lukáš Czerner @ 2014-07-18  9:04 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: ext4 development

On Thu, 17 Jul 2014, Eric Sandeen wrote:

> Date: Thu, 17 Jul 2014 16:11:59 -0500
> From: Eric Sandeen <sandeen@redhat.com>
> To: ext4 development <linux-ext4@vger.kernel.org>
> Subject: [PATCH] e2fsck: free bh on csum verify error in do_one_pass
> 
> Coverity (re-)spotted this; it was triaged as a false positive,
> but it seems pretty clear that the bh (which was just checked)
> isn't currently freed before the function exits.

Looks good.

Reviewed-by: Lukas Czerner <lczerner@redhat.com>

Thanks!
-Lukas


> 
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> ---
> 
> diff --git a/e2fsck/recovery.c b/e2fsck/recovery.c
> index 54579c2..66d02b2 100644
> --- a/e2fsck/recovery.c
> +++ b/e2fsck/recovery.c
> @@ -523,6 +523,7 @@ static int do_one_pass(journal_t *journal,
>  			    !jbd2_descr_block_csum_verify(journal,
>  							  bh->b_data)) {
>  				err = -EIO;
> +				brelse(bh);
>  				goto failed;
>  			}
>  
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] e2fsck: free bh on csum verify error in do_one_pass
  2014-07-18  9:04 ` Lukáš Czerner
@ 2014-07-22 16:31   ` Theodore Ts'o
  0 siblings, 0 replies; 3+ messages in thread
From: Theodore Ts'o @ 2014-07-22 16:31 UTC (permalink / raw)
  To: Lukáš Czerner; +Cc: Eric Sandeen, ext4 development

On Fri, Jul 18, 2014 at 11:04:45AM +0200, Lukáš Czerner wrote:
> On Thu, 17 Jul 2014, Eric Sandeen wrote:
> 
> > Date: Thu, 17 Jul 2014 16:11:59 -0500
> > From: Eric Sandeen <sandeen@redhat.com>
> > To: ext4 development <linux-ext4@vger.kernel.org>
> > Subject: [PATCH] e2fsck: free bh on csum verify error in do_one_pass
> > 
> > Coverity (re-)spotted this; it was triaged as a false positive,
> > but it seems pretty clear that the bh (which was just checked)
> > isn't currently freed before the function exits.
> 
> Looks good.
> 
> Reviewed-by: Lukas Czerner <lczerner@redhat.com>

Thanks, applied.

					- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-07-22 20:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-17 21:11 [PATCH] e2fsck: free bh on csum verify error in do_one_pass Eric Sandeen
2014-07-18  9:04 ` Lukáš Czerner
2014-07-22 16:31   ` 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).