* [patch] reiserfs: potential ERR_PTR dereference
@ 2011-01-15 13:46 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2011-01-15 13:46 UTC (permalink / raw)
To: reiserfs-devel; +Cc: linux-kernel, kernel-janitors
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@gmail.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",
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [patch] reiserfs: potential ERR_PTR dereference
@ 2011-01-15 13:46 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2011-01-15 13:46 UTC (permalink / raw)
To: reiserfs-devel; +Cc: linux-kernel, kernel-janitors
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@gmail.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",
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-01-15 13:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-15 13:46 [patch] reiserfs: potential ERR_PTR dereference Dan Carpenter
2011-01-15 13:46 ` Dan Carpenter
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.