From: Al Viro <viro@ZenIV.linux.org.uk>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Jens Axboe <axboe@kernel.dk>, Nick Piggin <npiggin@gmail.com>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
Network Development <netdev@vger.kernel.org>,
Eric Dumazet <edumazet@google.com>
Subject: Re: skb_splice_bits() and large chunks in pipe (was Re: xfs_file_splice_read: possible circular locking dependency detected
Date: Mon, 19 Sep 2016 01:22:59 +0100 [thread overview]
Message-ID: <20160919002258.GJ2356@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20160918223117.GH2356@ZenIV.linux.org.uk>
On Sun, Sep 18, 2016 at 11:31:17PM +0100, Al Viro wrote:
> At the moment there are 11 callers (10 in mainline; one more added in
> conversion of vmsplice_to_pipe() to new pipe locking, but it's irrelevant
> anyway - it gets fed an iovec-backed iov_iter). I'm looking through those
> right now, hopefully will come up with something sane...
FWIW, I wonder how many of those users are ready to cope with compound
pages in the first place; they end up passed to
* skb_fill_page_desc(). Probably OK (as in all of them, modulo
calculating the number of pages and ranges for them).
* shoved into scatterlist, which gets passed to virtqueue_add_sgs().
Need to check virtio to see what happens there.
* shoved into nfs ->wb_page and fed into nfs_pageio_add_request() and
machinery behind it. These, BTW, are reachable by pipe_buffer-derived ones
at the moment (splice to O_DIRECT nfs file). The code looks like it's
playing fast and loose with ->wb_page - in some cases it's an NFS pagecache
one, in some - anything from userland, and there are places like
inode = page_file_mapping(req->wb_page)->host;
which will do nasty things if they are ever reached by the second kind.
nfs_pgio_rpcsetup() looks like it won't be happy with compound pages, but
again, I'm not familiar enough with that code to tell if it's reachable
from nfs_pageio_add_request().
* shoved into scatterlist, which gets fed into crypto/*.c machinery.
No way for a pipe_buffer stuff to get there, fortunately, because I would
be very surprised if it works correctly with compound pages and large
ranges in those.
* shoved into lustre ->ldp_pages; almost certainly not ready for
compound pages.
* fed to ceph_osd_data_pages_init(); again, practically certain not
to be ready.
* put into dio_submit ->pages[], eventually fed to bio_add_page();
that might be fixable, but it would take some massage in fs/direct-io.c
* fuse - probably OK, but that's only on a fairly cursory look.
It certainly won't be easy to verify in details ;-/
next prev parent reply other threads:[~2016-09-19 0:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CA+55aFxrqCng2Qxasc9pyMrKUGFjo==fEaFT1vkH9Lncte3RgQ@mail.gmail.com>
[not found] ` <20160909023452.GO2356@ZenIV.linux.org.uk>
[not found] ` <CA+55aFwHQMjO4-vtfB9-ytc=o+DRo-HXVGckvXLboUxgpwb7_g@mail.gmail.com>
[not found] ` <20160909221945.GQ2356@ZenIV.linux.org.uk>
[not found] ` <CA+55aFzTOOB6oEVaaGD0N7Uznk-W9+ULPwzsxS_L_oZqGVSeLA@mail.gmail.com>
[not found] ` <20160914031648.GB2356@ZenIV.linux.org.uk>
[not found] ` <CA+55aFznQaOWoSMNphgGJJWZ=8-odrc0DAUMzfGPQe+_N4UgNA@mail.gmail.com>
[not found] ` <20160914042559.GC2356@ZenIV.linux.org.uk>
[not found] ` <20160917082007.GA6489@ZenIV.linux.org.uk>
[not found] ` <20160917190023.GA8039@ZenIV.linux.org.uk>
2016-09-18 19:31 ` skb_splice_bits() and large chunks in pipe (was Re: xfs_file_splice_read: possible circular locking dependency detected Al Viro
2016-09-18 20:12 ` Linus Torvalds
2016-09-18 22:31 ` Al Viro
2016-09-19 0:18 ` Linus Torvalds
2016-09-19 0:22 ` Al Viro [this message]
2016-09-20 9:51 ` Herbert Xu
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=20160919002258.GJ2356@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=axboe@kernel.dk \
--cc=edumazet@google.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=npiggin@gmail.com \
--cc=torvalds@linux-foundation.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;
as well as URLs for NNTP newsgroup(s).