public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Cc: linux-kernel@vger.kernel.org, Steven Noonan <steven@uplinklabs.net>
Subject: Re: [PATCH -tip] uaccess: fix parameters inversion for __copy_from_user_inatomic()
Date: Tue, 16 Sep 2008 07:42:16 +0200	[thread overview]
Message-ID: <20080916054216.GA13741@elte.hu> (raw)
In-Reply-To: <48CF061A.5060002@ct.jp.nec.com>


* Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com> wrote:

> From: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
> 
> The following patch changes to use __copy_from_user_inatomic(),
> but the passing parameters incorrect.
> 
>     x86: some lock annotations for user copy paths, v3
> 
>     - add annotation back to clear_user()
>     - change probe_kernel_address() to _inatomic*() method
> 
> Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
> ---
>  include/linux/uaccess.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/include/linux/uaccess.h b/include/linux/uaccess.h
> index 2062293..6b58367 100644
> --- a/include/linux/uaccess.h
> +++ b/include/linux/uaccess.h
> @@ -78,7 +78,7 @@ static inline unsigned long __copy_from_user_nocache(void *to,
>  							\
>  		set_fs(KERNEL_DS);			\
>  		pagefault_disable();			\
> -		ret = __copy_from_user_inatomic((__force typeof(retval) __user *)(addr), &(retval), sizeof(retval));		\
> +		ret = __copy_from_user_inatomic(&(retval), (__force typeof(retval) __user *)(addr), sizeof(retval));		\

*blush*. Thanks!

	Ingo

  parent reply	other threads:[~2008-09-16  5:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-16  1:04 [PATCH -tip] uaccess: fix parameters inversion for __copy_from_user_inatomic() Hiroshi Shimamoto
2008-09-16  1:21 ` Steven Noonan
2008-09-16  5:42 ` Ingo Molnar [this message]
2008-09-18 22:19 ` Andrew Morton
2008-09-19  8:53   ` Ingo Molnar

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=20080916054216.GA13741@elte.hu \
    --to=mingo@elte.hu \
    --cc=h-shimamoto@ct.jp.nec.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=steven@uplinklabs.net \
    /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