From: Alexey Khoroshilov <khoroshilov@ispras.ru>
To: Christoph Hellwig <hch@tuxera.com>
Cc: Alexey Khoroshilov <khoroshilov@ispras.ru>,
Anton Salikhmetov <alexo@tuxera.com>,
Al Viro <viro@zeniv.linux.org.uk>,
roman@ardistech.com, linux-kernel@vger.kernel.org,
ldv-project@ispras.ru
Subject: [PATCH 2/2] hfsplus: Fix double iput of the same inode in hfsplus_fill_super()
Date: Fri, 24 Jun 2011 01:15:02 +0400 [thread overview]
Message-ID: <1308863702-30859-2-git-send-email-khoroshilov@ispras.ru> (raw)
In-Reply-To: <1308863702-30859-1-git-send-email-khoroshilov@ispras.ru>
There is a misprint in resource deallocation code on error path in
hfsplus_fill_super(): the sbi->alloc_file inode is iput twice,
while the root inode in not iput at all.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
---
fs/hfsplus/super.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c
index 07a0502..8bfbd38 100644
--- a/fs/hfsplus/super.c
+++ b/fs/hfsplus/super.c
@@ -504,7 +504,7 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent)
out_put_hidden_dir:
iput(sbi->hidden_dir);
out_put_root:
- iput(sbi->alloc_file);
+ iput(root);
out_put_alloc_file:
iput(sbi->alloc_file);
out_close_cat_tree:
--
1.7.4.1
next prev parent reply other threads:[~2011-06-23 21:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-23 21:15 [PATCH 1/2] hfsplus: add error checking for hfs_find_init() Alexey Khoroshilov
2011-06-23 21:15 ` Alexey Khoroshilov [this message]
2011-06-30 11:42 ` [PATCH 2/2] hfsplus: Fix double iput of the same inode in hfsplus_fill_super() Christoph Hellwig
2011-06-30 11:42 ` [PATCH 1/2] hfsplus: add error checking for hfs_find_init() Christoph Hellwig
2011-07-05 22:29 ` [PATCH v2 0/2] " Alexey Khoroshilov
2011-07-05 22:29 ` [PATCH v2 1/2] " Alexey Khoroshilov
2011-07-05 22:30 ` [PATCH v2 2/2] hfsplus: Add error propagation for hfsplus_ext_write_extent_locked Alexey Khoroshilov
2011-07-07 16:33 ` [PATCH v2 0/2] hfsplus: add error checking for hfs_find_init() 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=1308863702-30859-2-git-send-email-khoroshilov@ispras.ru \
--to=khoroshilov@ispras.ru \
--cc=alexo@tuxera.com \
--cc=hch@tuxera.com \
--cc=ldv-project@ispras.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=roman@ardistech.com \
--cc=viro@zeniv.linux.org.uk \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.