[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230320111229.a2zi3m5rszuhffwx@quack3>
Date: Mon, 20 Mar 2023 12:12:29 +0100
From: Jan Kara <jack@...e.cz>
To: Yangtao Li <frank.li@...o.com>
Cc: Jan Kara <jack@...e.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] quota: check for register_sysctl() failure
On Sun 19-03-23 00:06:39, Yangtao Li wrote:
> 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>
...
> @@ -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");
Well, but this is going to make system unbootable with CONFIG_QUOTA &&
!CONFIG_SYSCTL. Quota functionality actually does not depend on sysctl
being available so just continuing without sysctl is perfectly fine.
Honza
--
Jan Kara <jack@...e.com>
SUSE Labs, CR
Powered by blists - more mailing lists