login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
May
»
5
Re: [PATCH v2] unify sys_pipe implementation
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From:
Michael Kerrisk <mtk.manpages@...>
To: DM <dm.n9107@...>
Cc: Ulrich Drepper <drepper@...>, <linux-kernel@...>, <akpm@...>, <linux-mips@...>, <sparclinux@...>, <torvalds@...>
Subject:
Re: [PATCH v2] unify sys_pipe implementation
Date: Monday, May 5, 2008 - 5:15 am
On 5/5/08, DM <dm.n9107@gmail.com> wrote:
quoted text
> On Sat, May 3, 2008 at 8:01 PM, Ulrich Drepper <drepper@redhat.com> wrote: > [...] > > > /* > > + * sys_pipe() is the normal C calling standard for creating > > + * a pipe. It's not the way Unix traditionally does this, though. > > + */ > > +asmlinkage long sys_pipe(int __user *fildes) > > +{ > > + int fd[2]; > > + int error; > > + > > + error = do_pipe(fd); > > + if (!error) { > > + if (copy_to_user(fildes, fd, sizeof(fd))) > > + error = -EFAULT; > > + } > > + return error; > > +} > > + > > [...] > > I realize this code is old, but wouldn't file descriptors leak if > copy_to_user fails?
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
--
unsubscribe notice
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/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH v2] unify sys_pipe implementation
, Ulrich Drepper
, (Sat May 3, 2:01 pm)
Re: [PATCH v2] unify sys_pipe implementation
, DM
, (Mon May 5, 4:30 am)
Re: [PATCH v2] unify sys_pipe implementation
, Ralf Baechle
, (Mon May 5, 6:18 am)
Re: [PATCH v2] unify sys_pipe implementation
, Michael Kerrisk
, (Mon May 5, 5:15 am)
Re: [PATCH v2] unify sys_pipe implementation
, Linus Torvalds
, (Sat May 3, 2:40 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg KH
[GIT PATCH] driver core patches against 2.6.24
Tarkan Erimer
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
Amit K. Arora
[RFC] Heads up on sys_fallocate()
Chuck Ebbert
Why do so many machines need "noapic"?
git
:
linux-netdev
:
Jarek Poplawski
[PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
David Miller
[GIT]: Networking
Gerrit Renker
[PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side)
Natalie Protasevich
[BUG] New Kernel Bugs
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
0 users
and
432 guests
online.
Syndicate