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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <54A06BC4.5030200@users.sourceforge.net>
Date:	Sun, 28 Dec 2014 21:44:52 +0100
From:	SF Markus Elfring <elfring@...rs.sourceforge.net>
To:	Eric Van Hensbergen <ericvh@...il.com>,
	Latchesar Ionkov <lucho@...kov.net>,
	Ron Minnich <rminnich@...dia.gov>,
	v9fs-developer@...ts.sourceforge.net
CC:	LKML <linux-kernel@...r.kernel.org>,
	kernel-janitors@...r.kernel.org,
	Julia Lawall <julia.lawall@...6.fr>
Subject: [PATCH 4/8] fs/9p: One function call less in v9fs_fid_xattr_get()
 after error detection

From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Sun, 28 Dec 2014 09:05:25 +0100

The p9_client_clunk() function was called in one case by the
v9fs_fid_xattr_get() function during error handling even if the passed
variable "attr_fid" contained a null pointer.

Let us delete an unnecessary variable assignment there and return from
this implementation directly after a failure detection for
a p9_client_xattrwalk() call.

Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
 fs/9p/xattr.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/9p/xattr.c b/fs/9p/xattr.c
index 8e72269..05ef790 100644
--- a/fs/9p/xattr.c
+++ b/fs/9p/xattr.c
@@ -34,8 +34,7 @@ ssize_t v9fs_fid_xattr_get(struct p9_fid *fid, const char *name,
 		retval = PTR_ERR(attr_fid);
 		p9_debug(P9_DEBUG_VFS, "p9_client_attrwalk failed %zd\n",
 			 retval);
-		attr_fid = NULL;
-		goto error;
+		return retval;
 	}
 	if (!buffer_size) {
 		/* request to get the attr_size */
-- 
2.2.1

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