[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20110115134605.GB2721@bicker>
Date: Sat, 15 Jan 2011 16:46:05 +0300
From: Dan Carpenter <error27@...il.com>
To: reiserfs-devel@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: [patch] reiserfs: potential ERR_PTR dereference
reiserfs_iget() returns an ERR_PTR on allocation failures. All the
other callers check for it so we should check here too.
Signed-off-by: Dan Carpenter <error27@...il.com>
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
index 0aab04f..6949b98 100644
--- a/fs/reiserfs/super.c
+++ b/fs/reiserfs/super.c
@@ -237,7 +237,7 @@ static int finish_unfinished(struct super_block *s)
pathrelse(&path);
inode = reiserfs_iget(s, &obj_key);
- if (!inode) {
+ if (IS_ERR_OR_NULL(inode)) {
/* the unlink almost completed, it just did not manage to remove
"save" link and release objectid */
reiserfs_warning(s, "vs-2180", "iget failed for %K",
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists