lkml.org 
[lkml]   [2016]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: fs: uninterruptible hang in handle_userfault
From
On 3/2/16, Linus Torvalds <torvalds@linux-foundation.org> wrote:
> On Wed, Mar 2, 2016 at 6:55 AM, Andrea Arcangeli <aarcange@redhat.com>
> wrote:
>>
>> Running page faults that late in the exit path with signal disabled
>> was frankly unexpected.
>
> I agree that it's less than wonderful.
>
>> Apparently it's not just
>> PF_EXITING that prevents SIGKILL to reach handle_userfault(). The
>> below change still didn't allow to kill the task:
>>
>> + exit_futex(tsk); /* run before setting PF_EXITING */
>> exit_signals(tsk); /* sets PF_EXITING */
>
> It's not just "exit_futex()" (what is that? I assume you mean
> exit_robust_list()) that triggers the problem, it's also the
>
> put_user(0, tsk->clear_child_tid);
>
> in mm_release().
>
> So it's not just about futexes.
>
> The might be other final user space accesses lurking too that I didn't
> even think about.
>
> Anyway, I committed (a) as the safest version with the least side
> effects. If people think some more about this and come up with
> solutions how to avoid these kinds of "very late user space accesses"
> cleanly, I think that would be great.
>

Is that commit [1] Linux-4.5 material or affects other versions, too?

commit 39680f50ae54cbbb6e72ac38b8329dd3eb9105f4
"userfaultfd: don't block on the last VM updates at exit time"

- Sedat -

[1] http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=39680f50ae54cbbb6e72ac38b8329dd3eb9105f4

\
 
 \ /
  Last update: 2016-03-03 09:01    [W:0.198 / U:1.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site