mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland@arm.com>
To: Wang ShaoBo <bobo.shaobowang@huawei.com>
Cc: cj.chengjian@huawei.com, huawei.libin@huawei.com,
	guohanjun@huawei.com, xiexiuqi@huawei.com, wcohen@redhat.com,
	linux-kernel@vger.kernel.org, mtk.manpages@gmail.com,
	wezhang@redhat.com, Christoph Hellwig <hch@infradead.org>
Subject: Re: [PATCH] sys_personality: Streamline code in sys_personality()
Date: Tue, 26 Nov 2019 11:28:16 +0000	[thread overview]
Message-ID: <20191126112815.GA32965@lakrids.cambridge.arm.com> (raw)
In-Reply-To: <20191126094045.134654-1-bobo.shaobowang@huawei.com>

On Tue, Nov 26, 2019 at 05:40:45PM +0800, Wang ShaoBo wrote:
> SYSCALL_DEFINE1 in kernel/exec_domain.c looks like verbose,
> ksys_personality() can make it more concise.
> 
> Signed-off-by: Wang ShaoBo <bobo.shaobowang@huawei.com>

FWIW, this looks fine to me:

Acked-by: Mark Rutland <mark.rutland@arm.com>

I'm not sure why I didn't do this initially; adding Christoph in case he
has any comments.

Mark.

> ---
>  kernel/exec_domain.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/kernel/exec_domain.c b/kernel/exec_domain.c
> index 33f07c5f2515..f7a0512ddc23 100644
> --- a/kernel/exec_domain.c
> +++ b/kernel/exec_domain.c
> @@ -37,10 +37,5 @@ module_init(proc_execdomains_init);
>  
>  SYSCALL_DEFINE1(personality, unsigned int, personality)
>  {
> -	unsigned int old = current->personality;
> -
> -	if (personality != 0xffffffff)
> -		set_personality(personality);
> -
> -	return old;
> +	return ksys_personality(personality);
>  }
> -- 
> 2.20.1
> 

  reply	other threads:[~2019-11-26 11:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-26  9:40 Wang ShaoBo
2019-11-26 11:28 ` Mark Rutland [this message]
2019-11-27  9:43 ` Christoph Hellwig

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=20191126112815.GA32965@lakrids.cambridge.arm.com \
    --to=mark.rutland@arm.com \
    --cc=bobo.shaobowang@huawei.com \
    --cc=cj.chengjian@huawei.com \
    --cc=guohanjun@huawei.com \
    --cc=hch@infradead.org \
    --cc=huawei.libin@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtk.manpages@gmail.com \
    --cc=wcohen@redhat.com \
    --cc=wezhang@redhat.com \
    --cc=xiexiuqi@huawei.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

all inboxes | Powered by JetHome®