From: Ingo Molnar <mingo@elte.hu>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: "Zhang, Yanmin" <yanmin_zhang@linux.intel.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Darren Hart <dvhltc@us.ibm.com>
Subject: Re: [GIT pull] futex fixes for 2.6.31
Date: Thu, 25 Jun 2009 12:04:13 +0200 [thread overview]
Message-ID: <20090625100413.GD29980@elte.hu> (raw)
In-Reply-To: <alpine.LFD.2.00.0906251151400.2767@localhost.localdomain>
* Thomas Gleixner <tglx@linutronix.de> wrote:
> On Thu, 25 Jun 2009, Zhang, Yanmin wrote:
> > On Wed, 2009-06-24 at 21:48 +0200, Thomas Gleixner wrote:
> > > +static int fault_in_user_writeable(u32 __user *uaddr)
> > > +{
> > > + int ret = get_user_pages(current, current->mm, (unsigned long)uaddr,
> > > + sizeof(*uaddr), 1, 0, NULL, NULL);
> > The 4th parameter of get_user_pages means page number. sizeof(*uaddr) is equal to
> > 4, so you want 4 pages?
>
> Grrr. I looked up the prototype of it in include/linux/mm.h:
>
> int get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
> unsigned long start, int len, int write, int force,
> struct page **pages, struct vm_area_struct **vmas);
>
> len == number of pages ! How intutitive. :(
>
> I guess Linus tripped over it as well. See:
> http://lkml.org/lkml/2009/6/21/95
heh, and then i suggested to you to change the '4' to sizeof(u32)
;-)
Ingo
next prev parent reply other threads:[~2009-06-25 10:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-24 14:36 [PATCH V2] futex: Fix the write access fault problem for real Thomas Gleixner
2009-06-24 16:46 ` Linus Torvalds
2009-06-24 19:48 ` [GIT pull] futex fixes for 2.6.31 Thomas Gleixner
2009-06-25 2:43 ` Zhang, Yanmin
2009-06-25 9:56 ` Thomas Gleixner
2009-06-25 10:04 ` Ingo Molnar [this message]
2009-06-25 18:15 ` [GIT pull] final " Thomas Gleixner
2009-06-25 18:26 ` Linus Torvalds
2009-06-25 9:58 ` [PATCH] clarify get_user_pages() prototype Peter Zijlstra
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=20090625100413.GD29980@elte.hu \
--to=mingo@elte.hu \
--cc=dvhltc@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=yanmin_zhang@linux.intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.