Re: fs: uninterruptible hang in handle_userfault

From: Dmitry Vyukov
Date: Wed Mar 02 2016 - 04:17:25 EST


On Tue, Mar 1, 2016 at 9:28 PM, Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
> On Tue, Mar 1, 2016 at 11:56 AM, Linus Torvalds
> <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
>>
>> (The above patches are entirely untested, maybe I misread the reason
>> it might be hanging and it's something else going on).
>
> Ok, I did some half-arsed testing. I didn't have a kernel with
> USERFAULT enabled, but I did compile one with both patches in place
> and I don't see a hang with the test program. Of course, since I
> didn't test with an unpatched kernel that would show the hang in the
> first place, it's entirely possible that my "no hang" result is due to
> something else. And I didn't bother to test the two patches
> independently either.
>
> But at least on the face of it, those patches fix the problem. Dmitry?


Both patches separately fix the hang.

Tested-by: Dmitry Vyukov <dvyukov@xxxxxxxxxx>

Regarding the more general fix, yesterday I've found a very similar
hang: unkillable processed hanged in snd_seq_oss_writeq_sync during
exit:
https://groups.google.com/forum/#!topic/syzkaller/bUvgnh0owos
Takashi fixed it in a better way (by deleting some code), but I though
that maybe the general fix will fix that hang as well. But no, it does
not. Still, since there are two such hangs, there can be more. Just
for what it's worth, I understand that changing fatal_signal_pending
can have far reaching implications.