From: WANG Cong <xiyou.wangcong@gmail.com>
To: Andrew Morton <akpm@osdl.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
WANG Cong <xiyou.wangcong@gmail.com>,
Ralf Baechle <ralf@linux-mips.org>
Subject: [PATCH 11/16] mips: use get_personality()
Date: Sat, 23 Feb 2008 16:14:14 +0800 [thread overview]
Message-ID: <1203754571655-git-send-email-xiyou.wangcong@gmail.com> (raw)
In-Reply-To: <12037545611159-git-send-email-xiyou.wangcong@gmail.com>
Use get_personality() macro instead of explicit reference
for mips code.
Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
---
arch/mips/kernel/linux32.c | 4 ++--
arch/mips/kernel/process.c | 4 ++--
include/asm-mips/elf.h | 2 +-
include/asm-mips/namei.h | 2 +-
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/arch/mips/kernel/linux32.c b/arch/mips/kernel/linux32.c
index 65af3cc..e5b7671 100644
--- a/arch/mips/kernel/linux32.c
+++ b/arch/mips/kernel/linux32.c
@@ -446,7 +446,7 @@ asmlinkage long sys32_newuname(struct new_utsname __user * name)
ret = -EFAULT;
up_read(&uts_sem);
- if (current->personality == PER_LINUX32 && !ret)
+ if (get_personality() == PER_LINUX32 && !ret)
if (copy_to_user(name->machine, "mips\0\0\0", 8))
ret = -EFAULT;
@@ -457,7 +457,7 @@ asmlinkage int sys32_personality(unsigned long personality)
{
int ret;
personality &= 0xffffffff;
- if (personality(current->personality) == PER_LINUX32 &&
+ if (personality(get_personality()) == PER_LINUX32 &&
personality == PER_LINUX)
personality = PER_LINUX32;
ret = sys_personality(personality);
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c
index 2c09a44..dc7486c 100644
--- a/arch/mips/kernel/process.c
+++ b/arch/mips/kernel/process.c
@@ -126,7 +126,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
childregs->regs[7] = 0; /* Clear error flag */
#if defined(CONFIG_BINFMT_IRIX)
- if (current->personality != PER_LINUX) {
+ if (get_personality() != PER_LINUX) {
/* Under IRIX things are a little different. */
childregs->regs[3] = 1;
regs->regs[3] = 0;
@@ -471,7 +471,7 @@ out:
*/
unsigned long arch_align_stack(unsigned long sp)
{
- if (!(current->personality & ADDR_NO_RANDOMIZE) && randomize_va_space)
+ if (!(get_personality() & ADDR_NO_RANDOMIZE) && randomize_va_space)
sp -= get_random_int() & ~PAGE_MASK;
return sp & ALMASK;
diff --git a/include/asm-mips/elf.h b/include/asm-mips/elf.h
index f69f7ac..c07f464 100644
--- a/include/asm-mips/elf.h
+++ b/include/asm-mips/elf.h
@@ -308,7 +308,7 @@ do { \
\
if (ibcs2) \
set_personality(PER_SVR4); \
- else if (current->personality != PER_LINUX32) \
+ else if (get_personality() != PER_LINUX32) \
set_personality(PER_LINUX); \
} while (0)
diff --git a/include/asm-mips/namei.h b/include/asm-mips/namei.h
index c94d12d..18ab9eb 100644
--- a/include/asm-mips/namei.h
+++ b/include/asm-mips/namei.h
@@ -9,7 +9,7 @@
static inline char *__emul_prefix(void)
{
- switch (current->personality) {
+ switch (get_personality()) {
case PER_IRIX32:
case PER_IRIXN32:
case PER_IRIX64:
--
1.5.3.8
next prev parent reply other threads:[~2008-02-23 8:35 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-23 8:14 [PATCH 00/16] (Resend) Use get_personality() WANG Cong
2008-02-23 8:14 ` [PATCH 01/16] Make the macro get_personality function-like WANG Cong
2008-02-23 8:14 ` [PATCH 02/16] mm: use get_personality() WANG Cong
2008-02-23 8:14 ` [PATCH 03/16] fs: " WANG Cong
2008-02-23 8:14 ` [PATCH 04/16] powerpc: " WANG Cong
2008-02-23 8:14 ` [PATCH 05/16] parisc: " WANG Cong
2008-02-23 8:14 ` [PATCH 06/16] sparc(64): " WANG Cong
2008-02-23 8:14 ` [PATCH 07/16] arm: " WANG Cong
2008-02-23 8:14 ` [PATCH 08/16] x86: " WANG Cong
2008-02-23 8:14 ` [PATCH 09/16] um: " WANG Cong
2008-02-23 8:14 ` [PATCH 10/16] s390: " WANG Cong
2008-02-23 8:14 ` WANG Cong [this message]
2008-02-23 8:14 ` [PATCH 12/16] ia64: " WANG Cong
2008-02-23 8:14 ` [PATCH 13/16] alpha: " WANG Cong
2008-02-23 8:14 ` [PATCH 14/16] frv: " WANG Cong
2008-02-23 8:14 ` [PATCH 15/16] mn10300: " WANG Cong
2008-02-23 8:14 ` [PATCH 16/16] kernel: " WANG Cong
2008-02-23 12:03 ` [PATCH 15/16] mn10300: " David Howells
2008-02-23 12:02 ` [PATCH 14/16] frv: " David Howells
2008-02-23 10:08 ` [PATCH 08/16] x86: " Ingo Molnar
2008-02-23 10:19 ` Ingo Molnar
2008-02-23 10:39 ` WANG Cong
2008-02-23 9:06 ` Accessor macros vs reference counting Matthew Wilcox
2008-02-23 12:46 ` David Newall
2008-02-23 14:56 ` Matthew Wilcox
2008-02-23 8:58 ` [PATCH 01/16] Make the macro get_personality function-like Bryan Wu
2008-02-23 12:02 ` David Howells
2008-02-23 8:51 ` [PATCH 00/16] (Resend) Use get_personality() Alexey Dobriyan
2008-02-23 8:59 ` WANG Cong
2008-02-23 9:27 ` Alexey Dobriyan
2008-02-23 9:56 ` WANG Cong
2008-02-23 18:37 ` Christoph Hellwig
2008-02-23 19:16 ` Andrew Morton
2008-02-24 4:03 ` WANG Cong
2008-02-25 2:14 ` [PATCH] Remove the macro get_personality WANG Cong
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=1203754571655-git-send-email-xiyou.wangcong@gmail.com \
--to=xiyou.wangcong@gmail.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ralf@linux-mips.org \
/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