Re: [PATCH 4.4 0/5] fanotify: Fix notification subsystem hang

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Apologies for the previous HTML email, my bad.

Yes, it does make sense for inclusion in 4.9.

I went and tested 4.9, saw the same hang, and backported the relevant patches. 4.9 requires only 3 of the 5 needed for 4.4.

I sent the patchset to the list, you should see them soon.

Let me know if there's anything else you need.

Thanks,
Matthew

On 11/04/19 4:44 AM, Sasha Levin wrote:
> On Wed, Apr 10, 2019 at 04:54:51PM +1200, Matthew Ruffell wrote:
>> BugLink: https://bugs.launchpad.net/bugs/1775165
>>
>> [Note to upstream]
>> I understand that this patch is a little long for -stable, but this patch series
>> fixes a real issue, seen by real users, is testable, and is made up from
>> upstream commits. Please consider it.
>>
>> [Impact]
>>
>> When userspace tasks which are processing fanotify permission events act
>> incorrectly, the fsnotify_mark_srcu SRCU is held indefinitely which causes
>> the whole notification subsystem to hang.
>>
>> This has been seen in production, and it can also be seen when running the
>> Linux Test Project testsuite, specifically fanotify07.
>>
>> [Fix]
>>
>> Instead of holding the SRCU lock while waiting for userspace to respond,
>> which may never happen, or not in the order we are expecting, we drop the
>> fsnotify_mark_srcu SRCU lock before waiting for userspace response, and then
>> reacquire the lock again when userspace responds.
>>
>> The fixes are from a series of upstream commits:
>>
>> 05f0e38724e8449184acd8fbf0473ee5a07adc6c (cherry-pick)
>> 9385a84d7e1f658bb2d96ab798393e4b16268aaa (backport)
>> abc77577a669f424c5d0c185b9994f2621c52aa4 (backport)
>>
>> The following are upstream commits necessary for the fixes to function:
>>
>> 35e481761cdc688dbee0ef552a13f49af8eba6cc (backport)
>> 0918f1c309b86301605650c836ddd2021d311ae2 (cherry-pick)
>
> This would also make sense for 4.9, right? I don't want to fix 4.4
> without fixing 4.9 as well.
>
> -- 
> Thanks,
> Sasha



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux