[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87d07z4s54.fsf@x220.int.ebiederm.org>
Date: Wed, 22 Apr 2020 07:33:11 -0500
From: ebiederm@...ssion.com (Eric W. Biederman)
To: Christoph Hellwig <hch@....de>
Cc: Kees Cook <keescook@...omium.org>,
Iurii Zaikin <yzaikin@...gle.com>,
Luis Chamberlain <mcgrof@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
linux-fsdevel@...r.kernel.org, netdev@...r.kernel.org,
bpf@...r.kernel.org
Subject: Re: [PATCH 4/6] sysctl: remove all extern declaration from sysctl.c
Christoph Hellwig <hch@....de> writes:
> Extern declarations in .c files are a bad style and can lead to
> mismatches. Use existing definitions in headers where they exist,
> and otherwise move the external declarations to suitable header
> files.
>
> Signed-off-by: Christoph Hellwig <hch@....de>
> ---
> include/linux/coredump.h | 6 ++++++
> include/linux/file.h | 2 ++
> include/linux/mm.h | 2 ++
> include/linux/mmzone.h | 2 ++
> include/linux/sysctl.h | 8 +++++++
> kernel/sysctl.c | 45 +++-------------------------------------
> 6 files changed, 23 insertions(+), 42 deletions(-)
>
> diff --git a/include/linux/coredump.h b/include/linux/coredump.h
> index abf4b4e65dbb..0fe8f3131e97 100644
> --- a/include/linux/coredump.h
> +++ b/include/linux/coredump.h
> @@ -22,4 +22,10 @@ extern void do_coredump(const kernel_siginfo_t *siginfo);
> static inline void do_coredump(const kernel_siginfo_t *siginfo) {}
> #endif
>
> +extern int core_uses_pid;
> +extern char core_pattern[];
> +extern unsigned int core_pipe_limit;
> +extern int pid_max;
> +extern int pid_max_min, pid_max_max;
These last two pid_max, pid_max_mind and pid_max_max would make more
sense in pid.h as they have nothing to do with coredumps.
> +
> #endif /* _LINUX_COREDUMP_H */
Powered by blists - more mailing lists