[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20100602082038.GA19079@linux-sh.org>
Date: Wed, 2 Jun 2010 17:20:38 +0900
From: Paul Mundt <lethal@...ux-sh.org>
To: David Howells <dhowells@...hat.com>
Cc: torvalds@...l.org, akpm@...ux-foundation.org,
linux-kernel@...r.kernel.org,
Takuya Yoshikawa <yoshikawa.takuya@....ntt.co.jp>,
Mike Frysinger <vapier@...too.org>,
Alexander Viro <viro@...iv.linux.org.uk>,
Daisuke HATAYAMA <d.hatayama@...fujitsu.com>
Subject: Re: [PATCH] binfmt_elf_fdpic: Fix clear_user() error handling
On Tue, Jun 01, 2010 at 02:10:47PM +0100, David Howells wrote:
> From: Takuya Yoshikawa <yoshikawa.takuya@....ntt.co.jp>
>
> clear_user() returns the number of bytes that could not be copied rather than
> an error code. So we should return -EFAULT rather than directly returning the
> results.
>
> Without this patch, positive values may be returned to elf_fdpic_map_file()
> and the following error handlings do not function as expected.
>
> 1.
> ret = elf_fdpic_map_file_constdisp_on_uclinux(params, file, mm);
> if (ret < 0)
> return ret;
> 2.
> ret = elf_fdpic_map_file_by_direct_mmap(params, file, mm);
> if (ret < 0)
> return ret;
>
> Signed-off-by: Takuya Yoshikawa <yoshikawa.takuya@....ntt.co.jp>
> Signed-off-by: David Howells <dhowells@...hat.com>
> Acked-by: Mike Frysinger <vapier@...too.org>
> CC: Alexander Viro <viro@...iv.linux.org.uk>
> CC: Andrew Morton <akpm@...ux-foundation.org>
> CC: Daisuke HATAYAMA <d.hatayama@...fujitsu.com>
> CC: Paul Mundt <lethal@...ux-sh.org>
Acked-by: Paul Mundt <lethal@...ux-sh.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists