public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Anand Jain <anand.jain@oracle.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Filipe Manana <fdmanana@kernel.org>,
	stable@vger.kernel.org, linux-btrfs@vger.kernel.org,
	agruenba@redhat.com
Subject: Re: [PATCH 00/17 stable-5.15.y] Fix mmap + page fault deadlocks
Date: Tue, 12 Apr 2022 13:14:17 +0800	[thread overview]
Message-ID: <82b27315-ee40-4a57-3973-5fcdce6ff82b@oracle.com> (raw)
In-Reply-To: <YlPdiqAxpS1HJDrc@kroah.com>



On 11/04/2022 15:49, Greg KH wrote:
> On Tue, Apr 05, 2022 at 07:32:11PM +0800, Anand Jain wrote:
>>
>>
>> On 04/04/2022 17:41, Filipe Manana wrote:
>>> On Sat, Apr 02, 2022 at 06:25:37PM +0800, Anand Jain wrote:
>>>> This set fixes a process hang issue in btrfs and gf2 filesystems. When we
>>>> do a direct IO read or write when the buffer given by the user is
>>>> memory-mapped to the file range we are going to do IO, we end up ending
>>>> in a deadlock. This is triggered by the test case generic/647 from
>>>> fstests.
>>>>
>>>> This fix depends on the iov_iter and iomap changes introduced in the
>>>> commit c03098d4b9ad ("Merge tag 'gfs2-v5.15-rc5-mmap-fault' of
>>>> git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2") and they
>>>> are part of this set for stable-5.15.y.
>>>>
>>>> Please note that patch 3/17 in this patchset changes the prototype and
>>>> renames an exported symbol as below. All its references are updated as
>>>> well.
>>>>
>>>> -EXPORT_SYMBOL(iov_iter_fault_in_readable);
>>>> +EXPORT_SYMBOL(fault_in_iov_iter_readable);
>>>>
>>>> Andreas Gruenbacher (15):
>>>>     powerpc/kvm: Fix kvm_use_magic_page
>>>>     gup: Turn fault_in_pages_{readable,writeable} into
>>>>       fault_in_{readable,writeable}
>>>>     iov_iter: Turn iov_iter_fault_in_readable into
>>>>       fault_in_iov_iter_readable
>>>>     iov_iter: Introduce fault_in_iov_iter_writeable
>>>>     gfs2: Add wrapper for iomap_file_buffered_write
>>>>     gfs2: Clean up function may_grant
>>>>     gfs2: Move the inode glock locking to gfs2_file_buffered_write
>>>>     gfs2: Eliminate ip->i_gh
>>>>     gfs2: Fix mmap + page fault deadlocks for buffered I/O
>>>>     iomap: Fix iomap_dio_rw return value for user copies
>>>>     iomap: Support partial direct I/O on user copy failures
>>>>     iomap: Add done_before argument to iomap_dio_rw
>>>>     gup: Introduce FOLL_NOFAULT flag to disable page faults
>>>>     iov_iter: Introduce nofault flag to disable page faults
>>>>     gfs2: Fix mmap + page fault deadlocks for direct I/O
>>>>
>>>> Bob Peterson (1):
>>>>     gfs2: Introduce flag for glock holder auto-demotion
>>>>
>>>> Filipe Manana (1):
>>>>     btrfs: fix deadlock due to page faults during direct IO reads and
>>>>       writes
>>>
>>> If this patchset is backported, then at least the following two commits
>>> must also be backported:
>>>
>>> commit fe673d3f5bf1fc50cdc4b754831db91a2ec10126
>>> Author: Linus Torvalds <torvalds@linux-foundation.org>
>>> Date:   Tue Mar 8 11:55:48 2022 -0800
>>>
>>>       mm: gup: make fault_in_safe_writeable() use fixup_user_fault()
>>>
>>> commit ca93e44bfb5fd7996b76f0f544999171f647f93b
>>> Author: Filipe Manana <fdmanana@suse.com>
>>> Date:   Wed Mar 2 11:48:39 2022 +0000
>>>
>>>       btrfs: fallback to blocking mode when doing async dio over multiple extents
>>
>> Thanks for pointing it out.
>>
>>> Maybe there's more that need to be backported. So cc'ing Andreas in
>>> case he's aware of any such other commits.
>>
>> I have scanned through the commits. I didn't find any further Fixes
>> for this series.
>>
>> I am sending these two patches in a new patch set as part2. Instead,
>> if it is better, I am ok to include these and send v2.
> 
> Please rebase the series and send a whole new one as I think there will
> be at least one change you can drop as it has been accepted already, and
> trying to deal with two different patch series is hard for everyone
> involved.
> 

  Sure I will do it. Thanks for pointing it out.

Thx, Anand

> thanks,
> 
> greg k-h

      reply	other threads:[~2022-04-12  5:14 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-02 10:25 [PATCH 00/17 stable-5.15.y] Fix mmap + page fault deadlocks Anand Jain
2022-04-02 10:25 ` [PATCH 01/17 stable-5.15.y] powerpc/kvm: Fix kvm_use_magic_page Anand Jain
2022-04-02 10:25 ` [PATCH 02/17 stable-5.15.y] gup: Turn fault_in_pages_{readable,writeable} into fault_in_{readable,writeable} Anand Jain
2022-04-02 10:25 ` [PATCH 03/17 stable-5.15.y] iov_iter: Turn iov_iter_fault_in_readable into fault_in_iov_iter_readable Anand Jain
2022-04-02 10:25 ` [PATCH 04/17 stable-5.15.y] iov_iter: Introduce fault_in_iov_iter_writeable Anand Jain
2022-04-02 10:25 ` [PATCH 05/17 stable-5.15.y] gfs2: Add wrapper for iomap_file_buffered_write Anand Jain
2022-04-02 10:25 ` [PATCH 06/17 stable-5.15.y] gfs2: Clean up function may_grant Anand Jain
2022-04-02 10:25 ` [PATCH 07/17 stable-5.15.y] gfs2: Move the inode glock locking to gfs2_file_buffered_write Anand Jain
2022-04-02 10:25 ` [PATCH 08/17 stable-5.15.y] gfs2: Eliminate ip->i_gh Anand Jain
2022-04-02 10:25 ` [PATCH 09/17 stable-5.15.y] gfs2: Fix mmap + page fault deadlocks for buffered I/O Anand Jain
2022-04-02 10:25 ` [PATCH 10/17 stable-5.15.y] iomap: Fix iomap_dio_rw return value for user copies Anand Jain
2022-04-02 10:25 ` [PATCH 11/17 stable-5.15.y] iomap: Support partial direct I/O on user copy failures Anand Jain
2022-04-02 10:25 ` [PATCH 12/17 stable-5.15.y] iomap: Add done_before argument to iomap_dio_rw Anand Jain
2022-04-02 10:25 ` [PATCH 13/17 stable-5.15.y] gup: Introduce FOLL_NOFAULT flag to disable page faults Anand Jain
2022-04-02 10:25 ` [PATCH 14/17 stable-5.15.y] iov_iter: Introduce nofault " Anand Jain
2022-04-02 10:25 ` [PATCH 15/17 stable-5.15.y] gfs2: Fix mmap + page fault deadlocks for direct I/O Anand Jain
2022-04-02 10:25 ` [PATCH 16/17 stable-5.15.y] gfs2: Introduce flag for glock holder auto-demotion Anand Jain
2022-04-02 10:25 ` [PATCH 17/17 stable-5.15.y] btrfs: fix deadlock due to page faults during direct IO reads and writes Anand Jain
2022-04-04  9:41 ` [PATCH 00/17 stable-5.15.y] Fix mmap + page fault deadlocks Filipe Manana
2022-04-05 11:32   ` Anand Jain
2022-04-11  7:49     ` Greg KH
2022-04-12  5:14       ` Anand Jain [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=82b27315-ee40-4a57-3973-5fcdce6ff82b@oracle.com \
    --to=anand.jain@oracle.com \
    --cc=agruenba@redhat.com \
    --cc=fdmanana@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox