public inbox for linux-bcachefs@vger.kernel.org
 help / color / mirror / Atom feed
From: AP <lkml@inml.grue.cc>
To: Edward Adam Davis <eadavis@qq.com>
Cc: syzbot+294f528e56138c357a48@syzkaller.appspotmail.com,
	kent.overstreet@linux.dev, linux-bcachefs@vger.kernel.org,
	linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [bcachefs?] BUG: unable to handle kernel paging request in bch2_opt_to_text
Date: Fri, 20 Sep 2024 12:37:34 +1000	[thread overview]
Message-ID: <Zuzf7hg_5aOZ7LJl@inml.grue.cc> (raw)
In-Reply-To: <tencent_50B5A5988DAD922A5D9B5DC9190C4FB08D07@qq.com>

On Thu, Sep 19, 2024 at 11:11:40PM +0800, Edward Adam Davis wrote:
> The format of the 'name=value' key value pair included in the options is
> incorrect, if only name is present.
> 
> #syz test
> 
> diff --git a/fs/bcachefs/opts.c b/fs/bcachefs/opts.c
> index e10fc1da71b1..5616dc8570fa 100644
> --- a/fs/bcachefs/opts.c
> +++ b/fs/bcachefs/opts.c
> @@ -472,6 +472,12 @@ int bch2_parse_one_mount_opt(struct bch_fs *c, struct bch_opts *opts,
>  	u64 v;
>  	int ret, id;
>  
> +	if (!val) {
> +		pr_err("Bad mount option, value is NULL");

Given that this would be user visible, NULL is unlikely to mean much. I believe that it
would be better to state "value is missing but required." or similar. This clearly tells
the user how they erred regardless of their programming knowledge.

AP

  parent reply	other threads:[~2024-09-20  2:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-18 23:29 [syzbot] [bcachefs?] BUG: unable to handle kernel paging request in bch2_opt_to_text syzbot
2024-09-19 15:11 ` Edward Adam Davis
2024-09-19 18:43   ` syzbot
2024-09-20  2:37   ` AP [this message]
2024-09-20 12:07     ` [PATCH V2] bcachefs: Fix null-ptr-deref " Edward Adam Davis
2024-09-19 22:55 ` [PATCH] " Edward Adam Davis

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=Zuzf7hg_5aOZ7LJl@inml.grue.cc \
    --to=lkml@inml.grue.cc \
    --cc=eadavis@qq.com \
    --cc=kent.overstreet@linux.dev \
    --cc=linux-bcachefs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzbot+294f528e56138c357a48@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    /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