]> git.hungrycats.org Git - linux/commitdiff
[PATCH] JBD kfree() fix
authorAndrew Morton <akpm@osdl.org>
Wed, 22 Oct 2003 01:21:45 +0000 (18:21 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Wed, 22 Oct 2003 01:21:45 +0000 (18:21 -0700)
I happened to spot this kfree(of complete garbage) - it is on an
oh-we-raced-retry path which is obviously exceedingly rare,

fs/jbd/journal.c

index 02a6af4d2ff631d8c508eaa33ed1bf26a7c27e27..04a96e22e58431d225c792eb297e2a43a1c3b6cb 100644 (file)
@@ -342,7 +342,7 @@ repeat:
                tmp = jbd_rep_kmalloc(bh_in->b_size, GFP_NOFS);
                jbd_lock_bh_state(bh_in);
                if (jh_in->b_frozen_data) {
-                       kfree(new_page);
+                       kfree(tmp);
                        goto repeat;
                }