lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1283711577-7505-1-git-send-email-segooon@gmail.com>
Date:	Sun,  5 Sep 2010 22:32:56 +0400
From:	Kulikov Vasiliy <segooon@...il.com>
To:	kernel-janitors@...r.kernel.org
Cc:	Vasiliy Kulikov <segooon@...il.com>, Jeff Dike <jdike@...toit.com>,
	Al Viro <viro@...iv.linux.org.uk>,
	Christoph Hellwig <hch@....de>,
	user-mode-linux-devel@...ts.sourceforge.net,
	user-mode-linux-user@...ts.sourceforge.net,
	linux-kernel@...r.kernel.org
Subject: [PATCH 10/14] hppfs: check for IS_ERR() instead of != NULL

From: Vasiliy Kulikov <segooon@...il.com>

Function get_inode may return ERR_PTR(...). Check for it.

Signed-off-by: Vasiliy Kulikov <segooon@...il.com>
---
 Compile tested.

 fs/hppfs/hppfs.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/hppfs/hppfs.c b/fs/hppfs/hppfs.c
index 7b02772..e7d6535 100644
--- a/fs/hppfs/hppfs.c
+++ b/fs/hppfs/hppfs.c
@@ -173,7 +173,7 @@ static struct dentry *hppfs_lookup(struct inode *ino, struct dentry *dentry,
 
 	err = -ENOMEM;
 	inode = get_inode(ino->i_sb, proc_dentry);
-	if (!inode)
+	if (IS_ERR_OR_NULL(inode))
 		goto out_dput;
 
  	d_add(dentry, inode);
@@ -730,7 +730,7 @@ static int hppfs_fill_super(struct super_block *sb, void *d, int silent)
 
 	err = -ENOMEM;
 	root_inode = get_inode(sb, proc_mnt->mnt_sb->s_root);
-	if (!root_inode)
+	if (IS_ERR_OR_NULL(root_inode))
 		goto out_mntput;
 
 	sb->s_root = d_alloc_root(root_inode);
-- 
1.7.0.4

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ