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 --
| Artem Bityutskiy | [PATCH take 2 06/28] UBIFS: add journal replay |
| Greg Kroah-Hartman | [PATCH 009/196] Chinese: add translation of sparse.txt |
| Gregory Haskins | [PATCH 0/2] [RFC] RT: Optionally allow IRQF_NODELAY on serial console |
| Andrew Morton | Re: [RFC/PATCH] Documentation of kernel messages |
git: | |
| ir0s | Local branch ahead of tracked remote branch but git push claims everything up-to-d... |
| Matthieu Moy | git push to a non-bare repository |
| Rocco Rutte | mercurial to git |
| Bill Lear | Git rescue mission |
| Sunnz | radeon driver in -current Xorg 7.2? |
| Neko | reliable, dd over simple ip network |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| Siju George | This is what Linus Torvalds calls openBSD crowd |
| Inaky Perez-Gonzalez | [PATCH 00/39] merge request for WiMAX kernel stack and i2400m driver |
| Linus Torvalds | Re: [GIT]: Networking |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Evgeniy Polyakov | Re: [bug, netconsole, SLUB] BUG skbuff_head_cache: Poison overwritten |
