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: <20200309161643.GA92486@suse.com>
Date:   Mon, 9 Mar 2020 16:16:43 +0000
From:   Luis Henriques <lhenriques@...e.com>
To:     David Howells <dhowells@...hat.com>
Cc:     linux-cachefs@...hat.com, linux-kernel@...r.kernel.org
Subject: [PATCH] fscache: drop fscache_cookie_put on duplicated cookies in
 the hash

When there's a collision due to a duplicate cookie, __fscache_register_netfs
will do an fscache_cookie_put.  This, however, isn't required as
fscache_cookie_get hasn't been executed, and will lead to a NULL pointer as
fscache_unhash_cookie will be called.

Signed-off-by: Luis Henriques <lhenriques@...e.com>
---
 fs/fscache/netfs.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/fscache/netfs.c b/fs/fscache/netfs.c
index cce92216fa28..07a55371f0a4 100644
--- a/fs/fscache/netfs.c
+++ b/fs/fscache/netfs.c
@@ -52,7 +52,6 @@ int __fscache_register_netfs(struct fscache_netfs *netfs)
 	return 0;
 
 already_registered:
-	fscache_cookie_put(candidate, fscache_cookie_put_dup_netfs);
 	_leave(" = -EEXIST");
 	return -EEXIST;
 }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ