NACK: [SRU] [B] [PATCH 0/1] fuse: fix deadlock with FUSE_PARALLEL_DIROPS
Stefan Bader
stefan.bader at canonical.com
Fri Apr 12 13:19:59 UTC 2019
On 12.04.19 08:45, Andrea Righi wrote:
> NACK'ing this patch. This fix is included in my last fuse-fixes pull
> request:
Also at the same time it would have been a candidate for stable. So it might be
part of that (when it is done) as well. To minimize confusion you should mark
this new bug report as a duplicate of the bug which you use to track your pull
request.
-Stefan
>
> https://lists.ubuntu.com/archives/kernel-team/2019-April/100025.html
>
> -Andrea
>
> On Thu, Apr 11, 2019 at 07:00:25PM +0200, Andrea Righi wrote:
>> Buglink: https://bugs.launchpad.net/bugs/1823972
>>
>> [Impact]
>>
>> * Enabling parallel dirops in fuse (FUSE_PARALLEL_DIROPS) may cause a race
>> condition that leave fuse inode's mutex held, triggering a deadlock
>>
>> * The problem is that the lock and unlock paths are relying on
>> get_fuse_conn(inode)->parallel_dirops to decide if the mutex needs to be
>> acquired/released, but its value might be set in the lock path and unset in
>> the unlock path (leaving the mutex held)
>>
>> * See also: https://github.com/hanwen/go-fuse/issues/281
>>
>> [Test Case]
>>
>> * A test case that triggers the bug almost immediately can be found here
>> https://github.com/hanwen/go-fuse/pull/288
>>
>> [Fix]
>>
>> * Instead of relying on get_fuse_conn(inode)->parallel_dirops both in
>> fuse_lock_inode() and fuse_unlock_inode(), only check this flag in the
>> locking path and pass a variable to fuse_unlock_inode() to determine if the
>> mutex was acquired or not
>>
>> [Regression Potential]
>>
>> * Fix has been tested on the affected platform. It is an upstream fix that
>> seems to affect only 4.7+ kernels, more exactly in our case only Bionic
>> kernels (and derived) are affected. Cosmic and above already include
>> this fix. So regression potential is minimal.
>>
>> Miklos Szeredi (1):
>> fuse: fix initial parallel dirops
>>
>> fs/fuse/dir.c | 10 ++++++----
>> fs/fuse/fuse_i.h | 4 ++--
>> fs/fuse/inode.c | 14 ++++++++++----
>> 3 files changed, 18 insertions(+), 10 deletions(-)
>>
>>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20190412/1f67045d/attachment.sig>
More information about the kernel-team
mailing list