public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: linux-arm-kernel@lists.infradead.org
Cc: Nicolas Kaiser <nikai@nikai.net>,
	Linus Walleij <linus.walleij@stericsson.com>,
	Per Friden <per.friden@stericsson.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dma/coh901318: fix copy_to_user error path
Date: Fri, 22 Oct 2010 19:38:12 +0200	[thread overview]
Message-ID: <201010221938.12591.arnd@arndb.de> (raw)
In-Reply-To: <20101022192953.1f67b10a@absol.kitzblitz>

On Friday 22 October 2010 19:29:53 Nicolas Kaiser wrote:
> If copy_to_user fails, the assigned error code instantly gets
> overwritten, and the failure apparently ignored. Moreover,
> shouldn't the error code be -EFAULT instead of -EINVAL?

Looks good, but it would be even better to just use
simple_read_from_buffer in this function, which takes care of
a lot the other complexities as well.

	Arnd

  reply	other threads:[~2010-10-22 17:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-22 17:29 [PATCH] dma/coh901318: fix copy_to_user error path Nicolas Kaiser
2010-10-22 17:38 ` Arnd Bergmann [this message]
2010-10-22 18:30   ` [PATCH] dma/coh901318: use simple_read_from_buffer Nicolas Kaiser
2010-10-22 19:16     ` Arnd Bergmann

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=201010221938.12591.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=linus.walleij@stericsson.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nikai@nikai.net \
    --cc=per.friden@stericsson.com \
    /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