Skip to contentSkip to conversation

MIPS: use current instead of task in syscall_get_arch

PATCH In review Eric Paris 3 participants 3 messages Apr 11, 2014 MIPS

lore
Share & tools
lore

Eric Paris

author
#0 lore raw

PATCH 1/1 MIPS: use current instead of task in syscall_get_arch

In commit 6e345746 Markos started using task to determine 64bit vs 32bit instead of it being completely CONFIG based.

In commit 5e937a9a we dropped the 'task' argument to syscall_get_arch() across the entire system.

This obviously results in a build failure when Linus's and the audit tree were merged. This patch should be applied as part of the merge conflict, as both sides of the merge are correct and the failure happens AT the merge.

The fix is simple. The task is always current. Use current.

---
 arch/mips/include/asm/syscall.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/include/asm/syscall.h +1 -1
index d79cded..1258884 100644
@@ -131,7 +131,7 @@ static inline int syscall_get_arch(void)
 {
 	int arch = EM_MIPS;
 #ifdef CONFIG_64BIT
-	if (!test_tsk_thread_flag(task, TIF_32BIT_REGS))
+	if (!test_tsk_thread_flag(current, TIF_32BIT_REGS))
 		arch |= __AUDIT_ARCH_64BIT;
 #endif
 #if defined(__LITTLE_ENDIAN)
Signature · 1 line
1.9.0
#1 lore raw
Quoted 11 lines · Eric Paris

In commit 6e345746 Markos started using task to determine 64bit vs 32bit instead of it being completely CONFIG based.

In commit 5e937a9a we dropped the 'task' argument to syscall_get_arch() across the entire system.

This obviously results in a build failure when Linus's and the audit tree were merged. This patch should be applied as part of the merge conflict, as both sides of the merge are correct and the failure happens AT the merge.

Quoted 7 lines

The fix is simple. The task is always current. Use current.

Quoted 19 lines
---
 arch/mips/include/asm/syscall.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/include/asm/syscall.h +1 -1
index d79cded..1258884 100644
@@ -131,7 +131,7 @@ static inline int syscall_get_arch(void)
 {
 	int arch = EM_MIPS;
 #ifdef CONFIG_64BIT
-	if (!test_tsk_thread_flag(task, TIF_32BIT_REGS))
+	if (!test_tsk_thread_flag(current, TIF_32BIT_REGS))
 		arch |= __AUDIT_ARCH_64BIT;
 #endif
 #if defined(__LITTLE_ENDIAN)
Signature · 1 line
1.9.0

- RGB

--
Richard Guy Briggs <[email protected]>
Senior Software Engineer, Kernel Security, AMER ENG Base Operating Systems, Red Hat Remote, Ottawa, Canada
Voice: +1.647.777.2635, Internal: (81) 32635, Alt: +1.613.693.0684x3545

Reviewed-by
#2 lore raw
Quoted 14 lines · Richard Guy Briggs
Quoted 13 lines · Eric Paris

In commit 6e345746 Markos started using task to determine 64bit vs 32bit instead of it being completely CONFIG based.

In commit 5e937a9a we dropped the 'task' argument to syscall_get_arch() across the entire system.

This obviously results in a build failure when Linus's and the audit tree were merged. This patch should be applied as part of the merge conflict, as both sides of the merge are correct and the failure happens AT the merge.

The fix is simple. The task is always current. Use current.

Quoted 7 lines
Quoted 5 lines

Looks good to me. Thanks for taking care of that.

Signature · 1 line
markos