diff options
| author | Andrew Morton <akpm@osdl.org> | 2004-05-21 20:38:29 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-05-21 20:38:29 -0700 |
| commit | 581ae915a3e17cbee9e393d4cf1e877b08b8a7a1 (patch) | |
| tree | 05efbc3831b1f02c355272f68d1e017d9bc71685 /net/socket.c | |
| parent | 2b590e8513e1ec259211630c21ef68f3ba2ded73 (diff) | |
[PATCH] Sanitise handling of unneeded syscall stubs
From: David Mosberger <davidm@napali.hpl.hp.com>
Below is a patch that tries to sanitize the dropping of unneeded system-call
stubs in generic code. In some instances, it would be possible to move the
optional system-call stubs into a library routine which would avoid the need
for #ifdefs, but in many cases, doing so would require making several
functions global (and possibly exporting additional data-structures in
header-files). Furthermore, it would inhibit (automatic) inlining in the
cases in the cases where the stubs are needed. For these reasons, the patch
keeps the #ifdef-approach.
This has been tested on ia64 and there were no objections from the
arch-maintainers (and one positive response). The patch should be safe but
arch-maintainers may want to take a second look to see if some __ARCH_WANT_foo
macros should be removed for their architecture (I'm quite sure that's the
case, but I wanted to play it safe and only preserved the status-quo in that
regard).
Diffstat (limited to 'net/socket.c')
| -rw-r--r-- | net/socket.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/socket.c b/net/socket.c index bee094985616..b2e1bba88c4e 100644 --- a/net/socket.c +++ b/net/socket.c @@ -87,6 +87,8 @@ #endif /* CONFIG_NET_RADIO */ #include <asm/uaccess.h> +#include <asm/unistd.h> + #include <net/compat.h> #include <net/sock.h> @@ -1817,6 +1819,8 @@ out: return err; } +#ifdef __ARCH_WANT_SYS_SOCKETCALL + /* Argument list sizes for sys_socketcall */ #define AL(x) ((x) * sizeof(unsigned long)) static unsigned char nargs[18]={AL(0),AL(3),AL(3),AL(3),AL(2),AL(3), @@ -1910,6 +1914,8 @@ asmlinkage long sys_socketcall(int call, unsigned long __user *args) return err; } +#endif /* __ARCH_WANT_SYS_SOCKETCALL */ + /* * This function is called by a protocol handler that wants to * advertise its address family, and have it linked into the |
