public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Mundt <lethal@linux-sh.org>
To: David Howells <dhowells@redhat.com>
Cc: torvalds@osdl.org, akpm@linux-foundation.org,
	linux-kernel@vger.kernel.org,
	Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>,
	Mike Frysinger <vapier@gentoo.org>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	Daisuke HATAYAMA <d.hatayama@jp.fujitsu.com>
Subject: Re: [PATCH] binfmt_elf_fdpic: Fix clear_user() error handling
Date: Wed, 2 Jun 2010 17:20:38 +0900	[thread overview]
Message-ID: <20100602082038.GA19079@linux-sh.org> (raw)
In-Reply-To: <20100601131047.5456.34014.stgit@warthog.procyon.org.uk>

On Tue, Jun 01, 2010 at 02:10:47PM +0100, David Howells wrote:
> From: Takuya Yoshikawa <yoshikawa.takuya@oss.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@oss.ntt.co.jp>
> Signed-off-by: David Howells <dhowells@redhat.com>
> Acked-by: Mike Frysinger <vapier@gentoo.org>
> CC: Alexander Viro <viro@zeniv.linux.org.uk>
> CC: Andrew Morton <akpm@linux-foundation.org>
> CC: Daisuke HATAYAMA <d.hatayama@jp.fujitsu.com>
> CC: Paul Mundt <lethal@linux-sh.org>

Acked-by: Paul Mundt <lethal@linux-sh.org>

  parent reply	other threads:[~2010-06-02  8:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-01 13:10 [PATCH] binfmt_elf_fdpic: Fix clear_user() error handling David Howells
2010-06-02  2:40 ` Takuya Yoshikawa
2010-06-02  8:20 ` Paul Mundt [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-05-28  7:56 [PATCH] binfmt_elf_fdpic: fix " Takuya Yoshikawa
2010-05-28 17:38 ` Mike Frysinger
2010-06-01 12:29   ` David Howells

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100602082038.GA19079@linux-sh.org \
    --to=lethal@linux-sh.org \
    --cc=akpm@linux-foundation.org \
    --cc=d.hatayama@jp.fujitsu.com \
    --cc=dhowells@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    --cc=vapier@gentoo.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=yoshikawa.takuya@oss.ntt.co.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox