From: Andrew Morton <akpm@linux-foundation.org>
To: kernel test robot <lkp@intel.com>
Cc: Tong Zhang <ztong0001@gmail.com>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Eric Biederman <ebiederm@xmission.com>,
Kees Cook <keescook@chromium.org>,
Luis Chamberlain <mcgrof@kernel.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>,
Luis Chamberlain <mcgrof@kernel.org>
Subject: Re: [PATCH v1] binfmt_misc: fix crash when load/unload module
Date: Mon, 24 Jan 2022 15:16:11 -0800 [thread overview]
Message-ID: <20220124151611.30db4381d910c853fc0c9728@linux-foundation.org> (raw)
In-Reply-To: <202201241937.i9KSsyAj-lkp@intel.com>
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>
---
include/linux/sysctl.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/include/linux/sysctl.h~a
+++ a/include/linux/sysctl.h
@@ -265,7 +265,7 @@ static inline struct ctl_table_header *r
return NULL;
}
-static inline struct sysctl_header *register_sysctl_mount_point(const char *path)
+static inline struct ctl_table_header *register_sysctl_mount_point(const char *path)
{
return NULL;
}
_
next prev parent reply other threads:[~2022-01-25 4:47 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-24 0:33 Tong Zhang
2022-01-24 10:40 ` Christian Brauner
2022-01-24 18:18 ` [PATCH v2 0/2] Fix regression on binfmt_misc Tong Zhang
2022-01-24 18:18 ` [PATCH v2 1/2] binfmt_misc: fix crash when load/unload module Tong Zhang
2022-01-25 18:15 ` Luis Chamberlain
2022-01-24 18:18 ` [PATCH v2 2/2] sysctl: fix return type to make compiler happy Tong Zhang
2022-01-24 18:23 ` [PATCH v1] binfmt_misc: fix crash when load/unload module Tong Zhang
2022-01-24 11:40 ` kernel test robot
2022-01-24 23:16 ` Andrew Morton [this message]
2022-01-25 18:14 ` Luis Chamberlain
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=20220124151611.30db4381d910c853fc0c9728@linux-foundation.org \
--to=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=mcgrof@kernel.org \
--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
Powered by JetHome