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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Date:   Fri, 11 Mar 2022 23:12:08 +0900
From:   Dominique Martinet <asmadeus@...ewreck.org>
To:     David Howells <dhowells@...hat.com>
Cc:     linux-cachefs@...hat.com, linux-kernel@...r.kernel.org,
        Dominique Martinet <asmadeus@...ewreck.org>
Subject: [PATCH] fscache_aquire_cache: error instead of asserting name is set

name comes straight from the cachefilesd config file, so return an error that
the daemon handles and reports instead of printing a kernel stack in dmesg

Signed-off-by: Dominique Martinet <asmadeus@...ewreck.org>
---
 fs/fscache/cache.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/fs/fscache/cache.c b/fs/fscache/cache.c
index 2749933852a9..6115b974585d 100644
--- a/fs/fscache/cache.c
+++ b/fs/fscache/cache.c
@@ -150,7 +150,9 @@ struct fscache_cache *fscache_acquire_cache(const char *name)
 {
 	struct fscache_cache *cache;
 
-	ASSERT(name);
+	if (!name)
+		return ERR_PTR(-EINVAL);
+
 	cache = fscache_lookup_cache(name, true);
 	if (IS_ERR(cache))
 		return cache;
-- 
2.35.1

Powered by blists - more mailing lists