From: Luis Chamberlain <mcgrof@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: kernel test robot <lkp@intel.com>,
Tong Zhang <ztong0001@gmail.com>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Eric Biederman <ebiederm@xmission.com>,
Kees Cook <keescook@chromium.org>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
llvm@lists.linux.dev, kbuild-all@lists.01.org,
Linux Memory Management List <linux-mm@kvack.org>
Subject: Re: [PATCH v1] binfmt_misc: fix crash when load/unload module
Date: Tue, 25 Jan 2022 10:14:46 -0800 [thread overview]
Message-ID: <YfA+FshocO96c/WH@bombadil.infradead.org> (raw)
In-Reply-To: <20220124151611.30db4381d910c853fc0c9728@linux-foundation.org>
On Mon, Jan 24, 2022 at 03:16:11PM -0800, Andrew Morton wrote:
> On Mon, 24 Jan 2022 19:40:53 +0800 kernel test robot <lkp@intel.com> wrote:
>
> > Hi Tong,
> >
> >
> > >> fs/binfmt_misc.c:828:21: error: incompatible pointer types assigning to 'struct ctl_table_header *' from 'struct sysctl_header *' [-Werror,-Wincompatible-pointer-types]
> > binfmt_misc_header = register_sysctl_mount_point("fs/binfmt_misc");
> > ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > 1 error generated.
> >
> >
> > vim +828 fs/binfmt_misc.c
> >
> > 821
> > 822 static int __init init_misc_binfmt(void)
> > 823 {
> > 824 int err = register_filesystem(&bm_fs_type);
> > 825 if (!err)
> > 826 insert_binfmt(&misc_format);
> > 827
> > > 828 binfmt_misc_header = register_sysctl_mount_point("fs/binfmt_misc");
> > 829 if (!binfmt_misc_header) {
> > 830 pr_warn("Failed to create fs/binfmt_misc sysctl mount point");
> > 831 return -ENOMEM;
> > 832 }
> > 833 return 0;
> > 834 }
> > 835
>
> This is actually a blooper in Luis's "sysctl: add helper to register a
> sysctl mount point".
>
> Please test, review, ridicule, etc:
>
> From: Andrew Morton <akpm@linux-foundation.org>
> Subject: include/linux/sysctl.h: fix register_sysctl_mount_point() return type
>
> The CONFIG_SYSCTL=n stub returns the wrong type.
>
> Fixes: ee9efac48a082 ("sysctl: add helper to register a sysctl mount point")
> Cc: Luis Chamberlain <mcgrof@kernel.org>
> Cc: Tong Zhang <ztong0001@gmail.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Luis Chamberlain <mcgrof@kernel.org>
Luis
next prev parent reply other threads:[~2022-01-25 18:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220124003342.1457437-1-ztong0001@gmail.com>
2022-01-24 11:40 ` [PATCH v1] binfmt_misc: fix crash when load/unload module kernel test robot
2022-01-24 23:16 ` Andrew Morton
2022-01-25 18:14 ` Luis Chamberlain [this message]
2022-01-26 5:04 ` Murphy Zhou
2022-01-26 5:23 ` Tong Zhang
2022-01-26 6:33 ` Tong Zhang
2022-01-29 0:25 ` Murphy Zhou
2022-01-24 12:14 ` kernel test robot
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=YfA+FshocO96c/WH@bombadil.infradead.org \
--to=mcgrof@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=ebiederm@xmission.com \
--cc=kbuild-all@lists.01.org \
--cc=keescook@chromium.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=viro@zeniv.linux.org.uk \
--cc=ztong0001@gmail.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;
as well as URLs for NNTP newsgroup(s).