> Mail-Followup-To: Alan Cox <alan@lxorguk.ukuu.org.uk>,
> Andi Kleen <ak@suse.de>, Pete Zaitcev <zaitcev@redhat.com>,
> Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
You headers are a little broken - you should include yourself.
> > AFS patches a collection of random syscalls in pretty icky ways. Again
> > afssyscall wants doing the right way - with a kernel stub like NFS has
> Attached is an untested patch for LiS.
How about attaching a tested patch? At unit testing level at least?
> + EXPORT_SYMBOL(register_streams_calls);
> + EXPORT_SYMBOL(unregister_streams_calls);
Isn't it EXPORT_SYMBOL_GPL? Otherwise you are just making general
override hooks.
> + static rwlock_t streams_call_lock = RW_LOCK_UNLOCKED;
Personally, I STONGLY disagree with people who put RW locks
everywhere by default. It's your decision though.
> + long asmlinkage sys_putpmsg(int fd, void *ctlptr, void *datptr, int band, int flags)
> + {
> + int ret = -ENOSYS;
> + read_lock(&streams_call_lock);
> + if (do_putpmsg)
> + ret = (*do_putpmsg) (fd, ctrlptr, datptr, band, flags);
> + read_unlock(&streams_call_lock);
> + return ret;
> + }
Can you sleep in putmsg? Not even for kmalloc?
Just get the pointer into a local variable.
> Index: include/asm-sparc/unistd.h
> ***************
> *** 166,173 ****
> #define __NR_pciconfig_read 148 /* ENOSYS under SunOS */
> #define __NR_pciconfig_write 149 /* ENOSYS under SunOS */
> #define __NR_getsockname 150 /* Common */
> ! /* #define __NR_getmsg 151 SunOS Specific */
> ! /* #define __NR_putmsg 152 SunOS Specific */
> #define __NR_poll 153 /* Common */
> #define __NR_getdents64 154 /* Linux specific */
> #define __NR_fcntl64 155 /* Linux sparc32 Specific */
> --- 166,173 ----
> #define __NR_pciconfig_read 148 /* ENOSYS under SunOS */
> #define __NR_pciconfig_write 149 /* ENOSYS under SunOS */
> #define __NR_getsockname 150 /* Common */
> ! #define __NR_getpmsg 151 /* Common */
> ! #define __NR_putpmsg 152 /* Common */
> #define __NR_poll 153 /* Common */
> #define __NR_getdents64 154 /* Linux specific */
> #define __NR_fcntl64 155 /* Linux sparc32 Specific */
I can take it if you make an oath that arguments are compatible
to SVR4 and SunOS.
-- Pete
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/