lkml.org 
[lkml]   [2009]   [Jun]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [GIT PULL] core kernel fixes
Linus,

On Sun, 21 Jun 2009, Linus Torvalds wrote:
> So just doing a "make_sure_its_writable()" and using handle_fault() is the
> right thing to do. Because it's what get_user_fast() would have done too,
> except it would have gone through first the fast case, and failed, then
> the slow case, and failed the lookup there, and then the slow case would
> have done that handle_mm_fault() in the end anyway.
>
> In fact, since you're not actually interested in the page, you _could_
> just do
>
> get_user_pages(tsk, mm, uaddr, 4, 1, 0, NULL, NULL);
>
> where a NULL "pages" pointer already tells get_user_pages() that you're
> not interested.
>
> That's at least cleaner than doing a "gup_fast()" (which isn't fast), and
> then freeing the page that you weren't even interested in.

Yes, you are right. The retry fixup path is after the fault and we
should go through handle_mm_fault as long as we do not have a general
available nondestructive counterpart of get_user().

I confused myself by twisting my brain whether we can simplify or even
get rid of the whole retry business.

Sorry, I did not express myself very well - looking for more than an
hour into the futex code definitely hurts your brain. It's worse than
the drugs you suspected we're on. :)

Thanks,

tglx


\
 
 \ /
  Last update: 2009-06-21 21:29    [W:0.042 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site