lkml.org 
[lkml]   [2008]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH][V3]Make get_user_pages interruptible
Ying Han wrote:
> thanks Pekka and i think one example of the case you mentioned is in
> access_process_vm() which is calling
> get_user_pages(tsk, mm, addr, 1, write, 1, &pages, &vma). However, it
> is allocating only one page here which
> much less likely to be stuck under memory pressure. Like you said, in
> order to make it more flexible for future
> changes, i might make the change like:
>>>>> */
>>>>> - if (unlikely(test_tsk_thread_flag(tsk, TIF_MEMDIE)))
>>>>> - return i ? i : -ENOMEM;
>>>>> + if (unlikely(sigkill_pending(current) | | sigkill_pending(tsk)))
>>>>> + return i ? i : -ERESTARTSYS;
>
> is this something acceptable?

The formatting is bit wacky but I'm certainly OK with the change.


\
 
 \ /
  Last update: 2008-11-24 23:53    [W:0.030 / U:1.860 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site