Skip to contentSkip to conversation

MIPS: Fix the syscall lookup_dcookie in scall64-o32.S

PATCH In review Wu Zhangjin 2 participants 2 messages Oct 10, 2009 – Oct 11, 2009 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MIPS: Fix the syscall lookup_dcookie in scall64-o32.S

When the kernel is 64bit, the application in O32 ABI will pass 4 arguments to syscall lookup_dcookie, but the implementation can only handle 3 arguments. This patch will fixes it.

---
 arch/mips/kernel/linux32.c     |    6 ++++++
 arch/mips/kernel/scall64-o32.S |    2 +-
 2 files changed, 7 insertions(+), 1 deletions(-)
arch/mips/kernel/linux32.c +6 -0
index 6242bc6..9dc09be 100644
@@ -428,3 +428,9 @@ _sys32_clone(nabi_no_regargs struct pt_regs regs)
 	return do_fork(clone_flags, newsp, &regs, 0,
 	               parent_tidptr, child_tidptr);
 }
+
+asmlinkage long sys32_lookup_dcookie(u32 dcookie_a0, u32 dcookie_a1,
+		char __user *buf, size_t len)
+{
+       return sys_lookup_dcookie(merge_64(dcookie_a0, dcookie_a1), buf, len);
+}
arch/mips/kernel/scall64-o32.S +1 -1
index 9bbf977..ba0dde6 100644
@@ -450,7 +450,7 @@ sys_call_table:
 	PTR	sys_io_submit
 	PTR	sys_io_cancel			/* 4245 */
 	PTR	sys_exit_group
-	PTR	sys_lookup_dcookie
+	PTR	sys32_lookup_dcookie
 	PTR	sys_epoll_create
 	PTR	sys_epoll_ctl
 	PTR	sys_epoll_wait			/* 4250 */
Signature · 1 line
1.6.2.1
#1 lore raw
Quoted 3 lines · Wu Zhangjin

When the kernel is 64bit, the application in O32 ABI will pass 4 arguments to syscall lookup_dcookie, but the implementation can only handle 3 arguments. This patch will fixes it.

Thanks folks, applied - but please use tabs not whitespace for indentation in the future ...

Ralf