mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Seth Forshee <seth.forshee@canonical.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-fsdevel@vger.kernel.org,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Pavel Ivanov <paivanof@gmail.com>,
	Hin-Tak Leung <htl10@users.sourceforge.net>
Subject: [PATCH] hfsplus: Fix kfree of wrong vhdr pointers
Date: Mon, 12 Sep 2011 10:27:07 -0500	[thread overview]
Message-ID: <1315841227-24535-1-git-send-email-seth.forshee@canonical.com> (raw)
In-Reply-To: <CAG1a4rubbzvOE3KoGmc_9svS-UFX8gzuE=3TnVYfGAeXCJpLYw@mail.gmail.com>

Commit 6596528 (hfsplus: ensure bio requests are not smaller than
the hardware sectors) changed the pointers used for volume header
allocations, but a couple of spots are still freeing the old
pointers. This patch fixes the problem.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Acked-by: Pavel Ivanov <paivanof@gmail.com>
Acked-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Cc: <stable@kernel.org>
---
 fs/hfsplus/super.c   |    4 ++--
 fs/hfsplus/wrapper.c |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c
index c106ca2..cadbb8c 100644
--- a/fs/hfsplus/super.c
+++ b/fs/hfsplus/super.c
@@ -525,8 +525,8 @@ out_close_cat_tree:
 out_close_ext_tree:
 	hfs_btree_close(sbi->ext_tree);
 out_free_vhdr:
-	kfree(sbi->s_vhdr);
-	kfree(sbi->s_backup_vhdr);
+	kfree(sbi->s_vhdr_buf);
+	kfree(sbi->s_backup_vhdr_buf);
 out_unload_nls:
 	unload_nls(sbi->nls);
 	unload_nls(nls);
diff --git a/fs/hfsplus/wrapper.c b/fs/hfsplus/wrapper.c
index 10e515a..7daf4b8 100644
--- a/fs/hfsplus/wrapper.c
+++ b/fs/hfsplus/wrapper.c
@@ -272,9 +272,9 @@ reread:
 	return 0;
 
 out_free_backup_vhdr:
-	kfree(sbi->s_backup_vhdr);
+	kfree(sbi->s_backup_vhdr_buf);
 out_free_vhdr:
-	kfree(sbi->s_vhdr);
+	kfree(sbi->s_vhdr_buf);
 out:
 	return error;
 }
-- 
1.7.4.1


  reply	other threads:[~2011-09-12 15:27 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-03  3:08 Kernel 3.1.0-rc4 oops when connecting iPod Pavel Ivanov
2011-09-03  3:59 ` Hin-Tak Leung
2011-09-03  4:37   ` Pavel Ivanov
2011-09-03  6:57     ` Hin-Tak Leung
2011-09-03 20:52       ` Pavel Ivanov
2011-09-03 23:35         ` Hin-Tak Leung
2011-09-03 23:59           ` Pavel Ivanov
2011-09-04  0:37             ` Hin-Tak Leung
2011-09-06  4:35               ` Pavel Ivanov
2011-09-06  5:12                 ` Hin-Tak Leung
2011-09-06 15:09                   ` Pavel Ivanov
2011-09-11  3:52                     ` Pavel Ivanov
2011-09-11 13:46                       ` Hin-Tak Leung
2011-09-11 14:14                         ` Christoph Hellwig
2011-09-11 14:12                       ` Christoph Hellwig
2011-09-12 14:34                       ` Christoph Hellwig
2011-09-12 15:19                         ` Pavel Ivanov
2011-09-12 15:31                           ` Christoph Hellwig
2011-09-13  2:20                             ` Pavel Ivanov
2011-09-14 17:42                               ` Christoph Hellwig
2011-09-15 14:35                                 ` Christoph Hellwig
2011-09-12 15:57                           ` Hin-Tak Leung
2011-09-07 17:59                 ` Seth Forshee
2011-09-08  3:13                   ` Hin-Tak Leung
2011-09-08 16:23                     ` Seth Forshee
2011-09-09 12:48                       ` Christoph Hellwig
2011-09-11  3:32                       ` Pavel Ivanov
2011-09-11 14:10                         ` Christoph Hellwig
2011-09-12 14:00                           ` Pavel Ivanov
2011-09-12 15:27                             ` Seth Forshee [this message]
2011-09-12 15:28                               ` [PATCH] hfsplus: Fix kfree of wrong vhdr pointers Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1315841227-24535-1-git-send-email-seth.forshee@canonical.com \
    --to=seth.forshee@canonical.com \
    --cc=hch@infradead.org \
    --cc=htl10@users.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paivanof@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®