linux-mips
[Top] [All Lists]

[RFC] [PATCH] sys_shmat for 64-bits in 32-bit compat mode

To: linux-mips@linux-mips.org
Subject: [RFC] [PATCH] sys_shmat for 64-bits in 32-bit compat mode
From: dmitry pervushin <dpervushin@ru.mvista.com>
Date: Thu, 01 Jun 2006 23:07:04 +0400
Organization: montavista
Original-recipient: rfc822;linux-mips@linux-mips.org
Reply-to: dpervushin@ru.mvista.com
Sender: linux-mips-bounce@linux-mips.org
Hello all,

I would like you to comment the following patch. At the some moment, I
was faced to problem with syscall sys_shmat in 32-bit mode on 64-bit
platforms. I have fixed the function in the same manner as native
sys_shmat had been: sys_shmat expects pointer to memory as the return
value rather than put_user'ed to the memory pointed by 3rd parameter.

Signed-off-by: dmitry pervushin <dpervushin@ru.mvista.com>
 arch/mips/kernel/linux32.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

Index: linux-mips/arch/mips/kernel/linux32.c
===================================================================
--- linux-mips.orig/arch/mips/kernel/linux32.c
+++ linux-mips/arch/mips/kernel/linux32.c
@@ -36,6 +36,7 @@
 #include <linux/security.h>
 #include <linux/compat.h>
 #include <linux/vfs.h>
+#include <linux/ptrace.h>
 
 #include <net/sock.h>
 #include <net/scm.h>
@@ -978,7 +979,8 @@ asmlinkage long sys32_shmat(int shmid, c
        if (err)
                return err;
 
-       return put_user(raddr, addr);
+       force_successful_syscall_return();
+       return raddr;
 }
 
 struct sysctl_args32



<Prev in Thread] Current Thread [Next in Thread>
  • [RFC] [PATCH] sys_shmat for 64-bits in 32-bit compat mode, dmitry pervushin <=