linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Eric Dumazet <dada1@cosmosbay.com>, Ingo Molnar <mingo@elte.hu>,
	Thomas Gleixner <tglx@linutronix.de>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [RFC PATCH 2/2] futex: use fast_gup()
Date: Fri, 04 Apr 2008 21:47:17 +0200	[thread overview]
Message-ID: <1207338437.29991.11.camel@lappy> (raw)
In-Reply-To: <20080404193817.830004000@chello.nl>

On Fri, 2008-04-04 at 21:33 +0200, Peter Zijlstra wrote:

> @@ -217,7 +199,7 @@ static int get_futex_key(u32 __user *uad
>  		return 0;
>  	}
>  
> -	err = get_user_pages(current, mm, address, 1, 0, 0, &page, NULL);
> +	err = fast_gup(address, 1, 0, &page);
>  	if (err < 0)
>  		return err;
>  


Failed to include the following hunk...

Index: linux-2.6/kernel/futex.c
===================================================================
--- linux-2.6.orig/kernel/futex.c
+++ linux-2.6/kernel/futex.c
@@ -203,6 +203,9 @@ static int get_futex_key(u32 __user *uad
 	if (err < 0)
 		return err;
 
+	if (!page)
+		return -EFAULT;
+
 	key->shared.page = page;
 	key->both.offset |= FUT_OFF_PAGE;
 

  reply	other threads:[~2008-04-04 19:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-04 19:33 [RFC PATCH 0/2] fast_gup for shared futexes Peter Zijlstra
2008-04-04 19:33 ` [RFC PATCH 1/2] futex: rely on get_user_pages() " Peter Zijlstra
2008-04-08 11:40   ` Nick Piggin
2008-04-08 16:59     ` Peter Zijlstra
2008-04-09  2:32       ` Nick Piggin
2008-04-09 13:51     ` Peter Zijlstra
2008-04-04 19:33 ` [RFC PATCH 2/2] futex: use fast_gup() Peter Zijlstra
2008-04-04 19:47   ` Peter Zijlstra [this message]
2008-04-04 19:56 ` [RFC PATCH 0/2] fast_gup for shared futexes Thomas Gleixner

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=1207338437.29991.11.camel@lappy \
    --to=a.p.zijlstra@chello.nl \
    --cc=dada1@cosmosbay.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mingo@elte.hu \
    --cc=nickpiggin@yahoo.com.au \
    --cc=tglx@linutronix.de \
    /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