Re: [PATCH 0/2] Avert possible deadlock with splice() and fanotify

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

 



On Wed, Nov 29, 2023 at 10:07 PM Amir Goldstein <amir73il@xxxxxxxxx> wrote:
>
> Christian,
>
> Josef has helped me see the light and figure out how to avoid the
> possible deadlock, which involves:
> - splice() from source file in a loop mounted fs to dest file in
>   a host fs, where the loop image file is
> - fsfreeze on host fs
> - write to host fs in context of fanotify permission event handler
>   (FAN_ACCESS_PERM) on the splice source file
>
> The first patch should not be changing any logic.
> I only build tested the ceph patch, so hoping to get an
> Acked-by/Tested-by from Jeff.
>
> The second patch rids us of the deadlock by not holding
> file_start_write() while reading from splice source file.
>

OOPS, I missed another corner case:
The COPY_FILE_SPLICE fallback of server-side-copy in nfsd/ksmbd
needs to use the start-write-safe variant of do_splice_direct(),
because in this case src and dst can be on any two fs.
Expect an extra patch in v2.

Thanks,
Amir.





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux