| To: | Al Viro <viro@xxxxxxxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: xfs_file_splice_read: possible circular locking dependency detected |
| From: | Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> |
| Date: | Thu, 8 Sep 2016 19:39:12 -0700 |
| Cc: | Dave Chinner <david@xxxxxxxxxxxxx>, CAI Qian <caiqian@xxxxxxxxxx>, linux-xfs <linux-xfs@xxxxxxxxxxxxxxx>, xfs@xxxxxxxxxxx |
| Delivered-to: | xfs@xxxxxxxxxxx |
| Dkim-signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=XP3i2NWh9IEwkDVrltr4cPHMH0WBNXR3mCrPsy+jICs=; b=bK4Zx9+HZRjx3JVJ7d2e8qpOmbYYFi8U7KpkLMaBZIE/zPpUbFrm5shOfZfjhvFqCj Kss+5A5cz5le9+uOplavoT12K+zGijeLrW0a65UgGDBcLOxLLVWzO/hW00FrzKjCFuCQ +6rlTbuYsSBtok13N1k/FalCT1CVKDVZjMQHQvkulS0lT5Ih62LXU9TholVRG/034SFA BF81bOg6s99iMsGN3HiIgBGqi4d1GYZc5Z227ZX6+ThbbzK/QnFHNJLDOs6yuPHyj3eV /Lxv2eag9UrpkEn2FjMxKDaiQXLoLGwA2LrUqCFgVNic7kn0dofOXMeDS6vCglqNFA2Z YJyA== |
| In-reply-to: | <20160909023153.GN2356@xxxxxxxxxxxxxxxxxx> |
| References: | <723420070.1340881.1472835555274.JavaMail.zimbra@xxxxxxxxxx> <1832555471.1341372.1472835736236.JavaMail.zimbra@xxxxxxxxxx> <20160903003919.GI30056@dastard> <1450936953.949798.1473348551588.JavaMail.zimbra@xxxxxxxxxx> <20160908175632.GH2356@xxxxxxxxxxxxxxxxxx> <CA+55aFzg+Q0DzFNBR9TeL13_yfrfFwHu9OrZe--Zpje0EeN4Cw@xxxxxxxxxxxxxx> <20160908213835.GY30056@dastard> <20160908235521.GL2356@xxxxxxxxxxxxxxxxxx> <20160909015324.GD30056@dastard> <CA+55aFzohsUXj_3BeFNr2t50Wm=G+7toRDEz=Tk7VJqP3n1hXQ@xxxxxxxxxxxxxx> <20160909023153.GN2356@xxxxxxxxxxxxxxxxxx> |
| Sender: | linus971@xxxxxxxxx |
On Thu, Sep 8, 2016 at 7:31 PM, Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:
>
> We care because __generic_file_splice_read() is playing fast and loose with
> pagecache. It gathers pointers to pages and *then* issues ->readpage() on
> them. Without any protection against hole-punching.
Ugh. It should just lock them when it gathers the pointers.
And in fact they *are* locked for the add_to_page_cache_lru() case,
but the splice code explicitly unlocks them in order to then
unconditionally lock them *again* in the IO path.
Oh, that's just crazy. And stupid.
You're right, that code just has to be killed. It's too wrong to live.
If you can replace it with the generic read iterator, then that does
indeed just fix things. So color me convinced.
Linus
|
| Previous by Date: | Re: xfs_file_splice_read: possible circular locking dependency detected, Al Viro |
|---|---|
| Next by Date: | Re: xfs_file_splice_read: possible circular locking dependency detected, Linus Torvalds |
| Previous by Thread: | Re: xfs_file_splice_read: possible circular locking dependency detected, Al Viro |
| Next by Thread: | Re: xfs_file_splice_read: possible circular locking dependency detected, Linus Torvalds |
| Indexes: | [Date] [Thread] [Top] [All Lists] |