mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Yangtao Li <frank.li@vivo.com>
Cc: Jan Kara <jack@suse.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] quota: check for register_sysctl() failure
Date: Mon, 20 Mar 2023 12:12:29 +0100	[thread overview]
Message-ID: <20230320111229.a2zi3m5rszuhffwx@quack3> (raw)
In-Reply-To: <20230318160640.48461-1-frank.li@vivo.com>

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

  reply	other threads:[~2023-03-20 11:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-18 16:06 Yangtao Li
2023-03-20 11:12 ` Jan Kara [this message]
2023-03-20 11:40   ` Yangtao Li
2023-03-20 17:11     ` Jan Kara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230320111229.a2zi3m5rszuhffwx@quack3 \
    --to=jack@suse.cz \
    --cc=frank.li@vivo.com \
    --cc=jack@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®