Skip to contentSkip to conversation

e2fsck: free bh on csum verify error in do_one_pass

PATCH Applied Eric Sandeen 3 participants 3 messages Jul 17, 2014 – Jul 22, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---

e2fsck/recovery.c +1 -0
index 54579c2..66d02b2 100644
@@ -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;
 			}
 
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Eric Sandeen

Date: Thu, 17 Jul 2014 16:11:59 -0500
From: Eric Sandeen <[email protected]>
To: ext4 development <[email protected]>
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.

Thanks!
-Lukas

Quoted 22 lines

---

e2fsck/recovery.c +1 -1
index 54579c2..66d02b2 100644
@@ -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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
Quoted 7 lines · Lukáš Czerner
Quoted 5 lines · Eric Sandeen

Date: Thu, 17 Jul 2014 16:11:59 -0500
From: Eric Sandeen <[email protected]>
To: ext4 development <[email protected]>
Subject: [PATCH] e2fsck: free bh on csum verify error in do_one_pass

Quoted 7 lines
Quoted 3 lines

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.

Thanks, applied.

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