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: <20230318160640.48461-1-frank.li@vivo.com>
Date:   Sun, 19 Mar 2023 00:06:39 +0800
From:   Yangtao Li <frank.li@...o.com>
To:     Jan Kara <jack@...e.com>
Cc:     Yangtao Li <frank.li@...o.com>, linux-kernel@...r.kernel.org
Subject: [PATCH] quota: check for register_sysctl() failure

register_sysctl() might fail, call panic() as with other failure
checks in this function if register_sysctl() failed.

Signed-off-by: Yangtao Li <frank.li@...o.com>
---
 fs/quota/dquot.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c
index 90cb70c82012..1483af271368 100644
--- a/fs/quota/dquot.c
+++ b/fs/quota/dquot.c
@@ -2955,7 +2955,8 @@ static int __init dquot_init(void)
 
 	printk(KERN_NOTICE "VFS: Disk quotas %s\n", __DQUOT_VERSION__);
 
-	register_sysctl("fs/quota", fs_dqstats_table);
+	if (!register_sysctl("fs/quota", fs_dqstats_table))
+		panic("Cannot register dquot sysctl");
 
 	dquot_cachep = kmem_cache_create("dquot",
 			sizeof(struct dquot), sizeof(unsigned long) * 4,
-- 
2.35.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ