lkml.org 
[lkml]   [2022]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v4 0/3] Avoid live-lock in btrfs fault-in+uaccess loop
    On Sat, Apr 23, 2022 at 09:35:42AM -0700, Linus Torvalds wrote:
    > On Sat, Apr 23, 2022 at 3:07 AM Catalin Marinas <catalin.marinas@arm.com> wrote:
    > >
    > > The series introduces fault_in_subpage_writeable() together with the
    > > arm64 probing counterpart and the btrfs fix.
    >
    > Looks fine to me - and I think it can probably go through the arm64
    > tree since you'd be the only one really testing it anyway.

    I'll queue it via arm64 then.

    > I assume you checked that btrfs is the only one that uses
    > fault_in_writeable() in this way? Everybody else updates to the right
    > byte boundary and retries (or returns immediately)?

    I couldn't find any other places (by inspection or testing). The
    buffered file I/O can already make progress in current fault_in_*() +
    copy_*_user() loops. O_DIRECT either goes via GUP (and memcpy() doesn't
    fault) or, if the user buffer is not PAGE aligned, it may fall back to
    buffered I/O. That's why I simplified the series, AFAICT it's only btrfs
    search_ioctl() with this problem.

    --
    Catalin

    \
     
     \ /
      Last update: 2022-04-23 20:41    [W:8.331 / U:0.036 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site