The second version of this patch with Linus' comments addressed. I've changed the code for a few architectures to use a new name (<arch>_pipe instead of sys_pipe) as per Linus' suggestion. I haven't touched MIPS and Sparc, they use too much magic in this area. Should be easy enough for the arch maintainer to clean up. sys_pipe is now unconditionally created in fs/pipe.c and they will lead to link errors in case the arch code isn't cleaned up. Some arch maintainers might want to take a look at their remaining special versions. The cris version, for instance, only differs from the generic version in that it takes the BKL. Is this still needed these days? arch/alpha/kernel/entry.S | 8 ++++---- arch/alpha/kernel/systbls.S | 2 +- arch/arm/kernel/sys_arm.c | 17 ----------------- arch/avr32/kernel/sys_avr32.c | 13 ------------- arch/blackfin/kernel/sys_bfin.c | 17 ----------------- arch/cris/arch-v10/kernel/entry.S | 2 +- arch/cris/arch-v32/kernel/entry.S | 2 +- arch/cris/kernel/sys_cris.c | 4 ++-- arch/frv/kernel/sys_frv.c | 17 ----------------- arch/h8300/kernel/sys_h8300.c | 17 ----------------- arch/ia64/kernel/entry.S | 2 +- arch/ia64/kernel/sys_ia64.c | 2 +- arch/m32r/kernel/sys_m32r.c | 4 ++-- arch/m32r/kernel/syscall_table.S | 2 +- arch/m68k/kernel/sys_m68k.c | 17 ----------------- arch/m68knommu/kernel/sys_m68k.c | 17 ----------------- arch/mn10300/kernel/sys_mn10300.c | 17 ----------------- arch/parisc/kernel/sys_parisc.c | 13 ------------- arch/powerpc/kernel/syscalls.c | 17 ----------------- arch/s390/kernel/entry.h | 1 - arch/s390/kernel/sys_s390.c | 17 ----------------- arch/sh/kernel/sys_sh32.c | 4 ++-- arch/sh/kernel/sys_sh64.c | 17 ----------------- arch/sh/kernel/syscalls_32.S | 2 +- arch/um/kernel/syscall.c | 17 ----------------- arch/v850...
On Sat, May 3, 2008 at 8:01 PM, Ulrich Drepper <drepper@redhat.com> wrote: [...] I realize this code is old, but wouldn't file descriptors leak if copy_to_user fails? BR, dm.n9107 --
The MIPS implementation doesn't have this problem; it returns the file descriptors in the result registers $v0 and $v1. But an interesting catch after so many years! Ralf --
Yes, it does -- I just tested this. -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Found a bug? http://www.kernel.org/doc/man-pages/reporting_bugs.html --
No, definitely not. That said, I think that in order to not break other architectures, and to make it even easier to do this transformation, how about we just mark the generic version with __weak? That way, odd architectures can just continue to call their own versions "sys_pipe()", and we don't break them unnecessarily. Linus --
| Alex Samad | page swap allocation error/failure in 2.6.25 |
| Bart Van Assche | Re: Integration of SCST in the mainstream Linux kernel |
| Andrea Arcangeli | [PATCH 06 of 11] rwsem contended |
| Chuck Ebbert | Why do so many machines need "noapic"? |
git: | |
| Andy Parkins | svn:externals using git submodules |
| Elijah Newren | Trying to use git-filter-branch to compress history by removing large, obsolete bi... |
| Marcus Griep | [PATCH] git-svn: Make it scream by minimizing temp files |
| Tommi Virtanen | [PATCH] "git shell" won't work, need "git-shell" |
| Marcos Laufer | dmesg IBM x3650 OpenBSD 4.3 |
| Theo de Raadt | Re: Chatting with developers? Is it soo 1996? |
| Ted Unangst | Re: MAXDSIZ 1GB memory limit for process |
| Richard Stallman | Real men don't attack straw men |
| Denys Fedoryshchenko | Re: thousands of classes, e1000 TX unit hang |
| Suresh Siddha | Re: Kernel oops with 2.6.26, padlock and ipsec: probably problem with fpu state ch... |
| Simon Horman | Re: [PATCH] sendfile() and UDP socket |
| Jeff Garzik | Re: [PATCH] sky2: jumbo frame regression fix |
