| To: | "Ulrich Drepper" <drepper@redhat.com> |
|---|---|
| Subject: | Re: [PATCH v2] unify sys_pipe implementation |
| From: | DM <dm.n9107@gmail.com> |
| Date: | Mon, 5 May 2008 10:30:09 +0200 |
| Cc: | linux-kernel@vger.kernel.org, akpm@linux-foundation.org, linux-mips@linux-mips.org, sparclinux@vger.kernel.org, torvalds@linux-foundation.org |
| Dkim-signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=1vNwkNd0nYp80jvMF7wkf5IzXiIWL5OfoM0OUPtffOY=; b=LW2i4fqiGK0gDCkGKjTOsbBU+Dwt8Fk/Puzc3G3d+TuAFzVNSNkDvOUW3ljxGS0bD4lvTN9BQOd3llDmkw6JpgldgBPoDd2diPHrUmFrl58o7YPqzl7FBr1QHh/AYeY8mPUc4HxjGwlnKYpJz/lx3JG0kCa59Da38YXkuGcxxYU= |
| Domainkey-signature: | a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=BlZwLZDhJ5raNDFiSkTgDB/awo0JiLN32gBHWuJQe3aT3Y9IDI28CKeeb5iFJZ0+Qo0d82CJr1Jy55dYyWaBhYUlWppdyTfT/11R1T28fXMf/Pzb8hp6TTPbd+cljYrson/oULp/4V4fmo8n81+vA/Aay08Hg1bx44tYIJLGuH0= |
| In-reply-to: | <200805031801.m43I109q032242@devserv.devel.redhat.com> |
| Original-recipient: | rfc822;linux-mips@linux-mips.org |
| References: | <200805031801.m43I109q032242@devserv.devel.redhat.com> |
| Sender: | linux-mips-bounce@linux-mips.org |
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?
BR,
dm.n9107
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Breakage in arch/mips/kernel/traps.c for 64bit, Thomas Bogendoerfer |
|---|---|
| Next by Date: | Re: [PATCH v2] unify sys_pipe implementation, Michael Kerrisk |
| Previous by Thread: | Re: [PATCH v2] unify sys_pipe implementation, Linus Torvalds |
| Next by Thread: | Re: [PATCH v2] unify sys_pipe implementation, Michael Kerrisk |
| Indexes: | [Date] [Thread] [Top] [All Lists] |