From: Hirokazu Takata The useless iBCS2 supporting code is removed. However, according to old_ syscalls, I would like to keep backward- compatibility for a while, due to some old deb packages and executables for m32r. I'm struggling to rebuild and replace old packages to new ones. http://debian.linux-m32r.org/ Signed-off-by: Hirokazu Takata Signed-off-by: Andrew Morton --- 25-akpm/arch/m32r/kernel/sys_m32r.c | 25 ++++++++++--------------- 1 files changed, 10 insertions(+), 15 deletions(-) diff -puN arch/m32r/kernel/sys_m32r.c~m32r-modify-sys_ipc-to-remove-useless-ibcs2-support-code arch/m32r/kernel/sys_m32r.c --- 25/arch/m32r/kernel/sys_m32r.c~m32r-modify-sys_ipc-to-remove-useless-ibcs2-support-code 2004-09-06 14:00:30.466972520 -0700 +++ 25-akpm/arch/m32r/kernel/sys_m32r.c 2004-09-06 14:00:30.470971912 -0700 @@ -227,21 +227,16 @@ asmlinkage int sys_ipc(uint call, int fi case MSGCTL: return sys_msgctl (first, second, (struct msqid_ds __user *) ptr); - case SHMAT: - switch (version) { - default: { - ulong raddr; - ret = do_shmat (first, (char __user *) ptr, - second, &raddr); - if (ret) - return ret; - return put_user (raddr, (ulong __user *) third); - } - case 1: /* iBCS2 emulator entry point */ - if (!segment_eq(get_fs(), get_ds())) - return -EINVAL; - return do_shmat (first, (char __user *) ptr, - second, (ulong *) third); + case SHMAT: { + ulong raddr; + + if ((ret = verify_area(VERIFY_WRITE, (ulong __user *) third, + sizeof(ulong)))) + return ret; + ret = do_shmat (first, (char __user *) ptr, second, &raddr); + if (ret) + return ret; + return put_user (raddr, (ulong __user *) third); } case SHMDT: return sys_shmdt ((char __user *)ptr); _