From: Wang ShaoBo <bobo.shaobowang@huawei.com>
To: <cj.chengjian@huawei.com>, <bobo.shaobowang@huawei.com>,
<mark.rutland@arm.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>
Subject: [PATCH] sys_personality: Streamline code in sys_personality()
Date: Tue, 26 Nov 2019 17:40:45 +0800 [thread overview]
Message-ID: <20191126094045.134654-1-bobo.shaobowang@huawei.com> (raw)
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>
---
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
next reply other threads:[~2019-11-26 9:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-26 9:40 Wang ShaoBo [this message]
2019-11-26 11:28 ` Mark Rutland
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=20191126094045.134654-1-bobo.shaobowang@huawei.com \
--to=bobo.shaobowang@huawei.com \
--cc=cj.chengjian@huawei.com \
--cc=guohanjun@huawei.com \
--cc=huawei.libin@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--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®