[PATCH 1/4] ext4: minor fix in jbd2 stats kmalloc failure case

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



(Mingming: these 4 patches can apply after 
jbd-stats-through-procfs-with-external-journal-oops-fix.patch)

---------------------------------------------------------------------

The other instance of this problem was caught, but this one got missed:
Free the correct pointer on s->stats allocation failure in jbd2_seq_info_open

Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>

---

Index: linux-2.6.24-rc3/fs/jbd2/journal.c
===================================================================
--- linux-2.6.24-rc3.orig/fs/jbd2/journal.c
+++ linux-2.6.24-rc3/fs/jbd2/journal.c
@@ -850,7 +850,7 @@ static int jbd2_seq_info_open(struct ino
 		return -EIO;
 	size = sizeof(struct transaction_stats_s);
 	s->stats = kmalloc(size, GFP_KERNEL);
-	if (s == NULL) {
+	if (s->stats == NULL) {
 		kfree(s);
 		return -EIO;
 	}


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

[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux