Re: [PATCH][V3]Make get_user_pages interruptible

From: Pekka Enberg
Date: Mon Nov 24 2008 - 17:49:48 EST


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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/