* [Patch] Remove unneeded check for xadir in fs/reiserfs/xattr.c
@ 2006-06-13 21:54 Eric Sesterhenn
2006-06-14 14:39 ` Jeff Mahoney
0 siblings, 1 reply; 2+ messages in thread
From: Eric Sesterhenn @ 2006-06-13 21:54 UTC (permalink / raw)
To: reiserfs-list
hi,
coverity complained that xadir is checked for !=NULL
and then passed to lookup_one_len() where it might get dereferenced.
This patch removes the check since open_xa_dir() returns an ERR_PTR() or
a valid dentry pointer. Coverity id #1194
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
--- linux-2.6.17-rc5/fs/reiserfs/xattr.c.orig 2006-06-13 23:50:10.000000000 +0200
+++ linux-2.6.17-rc5/fs/reiserfs/xattr.c 2006-06-13 23:50:45.000000000 +0200
@@ -200,7 +200,7 @@ static struct dentry *get_xa_file_dentry
xadir = open_xa_dir(inode, flags);
if (IS_ERR(xadir)) {
return ERR_PTR(PTR_ERR(xadir));
- } else if (xadir && !xadir->d_inode) {
+ } else if (!xadir->d_inode) {
dput(xadir);
return ERR_PTR(-ENODATA);
}
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [Patch] Remove unneeded check for xadir in fs/reiserfs/xattr.c
2006-06-13 21:54 [Patch] Remove unneeded check for xadir in fs/reiserfs/xattr.c Eric Sesterhenn
@ 2006-06-14 14:39 ` Jeff Mahoney
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Mahoney @ 2006-06-14 14:39 UTC (permalink / raw)
To: Eric Sesterhenn; +Cc: reiserfs-list
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Eric Sesterhenn wrote:
> hi,
>
> coverity complained that xadir is checked for !=NULL
> and then passed to lookup_one_len() where it might get dereferenced.
> This patch removes the check since open_xa_dir() returns an ERR_PTR() or
> a valid dentry pointer. Coverity id #1194
>
> Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
>
> --- linux-2.6.17-rc5/fs/reiserfs/xattr.c.orig 2006-06-13 23:50:10.000000000 +0200
> +++ linux-2.6.17-rc5/fs/reiserfs/xattr.c 2006-06-13 23:50:45.000000000 +0200
> @@ -200,7 +200,7 @@ static struct dentry *get_xa_file_dentry
> xadir = open_xa_dir(inode, flags);
> if (IS_ERR(xadir)) {
> return ERR_PTR(PTR_ERR(xadir));
> - } else if (xadir && !xadir->d_inode) {
> + } else if (!xadir->d_inode) {
> dput(xadir);
> return ERR_PTR(-ENODATA);
> }
>
>
Looks ok to me.
- -Jeff
- --
Jeff Mahoney
SUSE Labs
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org
iD8DBQFEkB+bLPWxlyuTD7IRAnacAKCO/x/4GvVwktuyaOqbGPGEQujNaQCgkTlV
RDm+IISOQgNzGRJ/ynvEHQU=
=dDQr
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-06-14 14:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-13 21:54 [Patch] Remove unneeded check for xadir in fs/reiserfs/xattr.c Eric Sesterhenn
2006-06-14 14:39 ` Jeff Mahoney
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.