Re: [PATCH] fix shmat

From: Manfred Spraul
Date: Mon Feb 23 2004 - 13:20:08 EST


From the bitkeeper commit message queue:


sys_shmat() need to be declared asmlinkage. This causes breakage when we
actually get the proper prototypes into caller's scope.


Why? sys_shmat is not a system call. Or at least there is a comment just before the implementation that this is not a syscall.
I think either the asmlinkage or the comment are wrong:
/*
* Fix shmaddr, allocate descriptor, map shm, add attach descriptor to lists.
*
* NOTE! Despite the name, this is NOT a direct system call entrypoint. The

* "raddr" thing points to kernel space, and there has to be a wrapper around
* this.
*/
-long sys_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr)
+asmlinkage long sys_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr)
{
struct shmid_kernel *shp;
unsigned long addr;


I'd propose to remove the asmlinkage and to move the prototype (without asmlinkage) back from syscalls.h to shm.h - what do you think?
--
Manfred

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/