lkml.org 
[lkml]   [2023]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@vivo.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@suse.com>
SUSE Labs, CR

\
 
 \ /
  Last update: 2023-03-27 01:08    [W:0.028 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site