[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180312083517.GA11010@infradead.org>
Date: Mon, 12 Mar 2018 01:35:17 -0700
From: Christoph Hellwig <hch@...radead.org>
To: Dominik Brodowski <linux@...inikbrodowski.net>
Cc: linux-kernel@...r.kernel.org, luto@...nel.org,
torvalds@...ux-foundation.org, mingo@...nel.org,
viro@...iv.linux.org.uk, akpm@...ux-foundation.org
Subject: Re: [RFC PATCH 04/35] syscalls: do not call sys_getpgid() within the
kernel
The subject (and lack of description) for this and the following patches
is rather confusing.
I'd expect something like:
---- snip ----
Subject: kernel: add a do_getpgid helper
And use it to avoid an in-kernel sys_getpgid call.
---- snip ----
instead.
On Sun, Mar 11, 2018 at 11:55:26AM +0100, Dominik Brodowski wrote:
> CC: Al Viro <viro@...iv.linux.org.uk>
> Signed-off-by: Dominik Brodowski <linux@...inikbrodowski.net>
> ---
> kernel/sys.c | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/sys.c b/kernel/sys.c
> index f2289de20e19..ebb138b841c8 100644
> --- a/kernel/sys.c
> +++ b/kernel/sys.c
> @@ -1027,7 +1027,7 @@ SYSCALL_DEFINE2(setpgid, pid_t, pid, pid_t, pgid)
> return err;
> }
>
> -SYSCALL_DEFINE1(getpgid, pid_t, pid)
> +static int do_getpgid(pid_t pid)
> {
> struct task_struct *p;
> struct pid *grp;
> @@ -1055,11 +1055,16 @@ SYSCALL_DEFINE1(getpgid, pid_t, pid)
> return retval;
> }
>
> +SYSCALL_DEFINE1(getpgid, pid_t, pid)
> +{
> + return do_getpgid(pid);
> +}
> +
> #ifdef __ARCH_WANT_SYS_GETPGRP
>
> SYSCALL_DEFINE0(getpgrp)
> {
> - return sys_getpgid(0);
> + return do_getpgid(0);
> }
>
> #endif
> --
> 2.16.2
>
---end quoted text---
Powered by blists - more mailing lists