From: Al Viro <viro@ZenIV.linux.org.uk>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] fuse: honour max_read and max_write in direct_io mode
Date: Wed, 24 Sep 2014 20:01:56 +0100 [thread overview]
Message-ID: <20140924190156.GF7996@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20140924150911.GB7441@tucsk.piliscsaba.szeredi.hu>
On Wed, Sep 24, 2014 at 05:09:11PM +0200, Miklos Szeredi wrote:
> From: Miklos Szeredi <mszeredi@suse.cz>
>
> The third argument of fuse_get_user_pages() "nbytesp" refers to the number of
> bytes a caller asked to pack into fuse request. This value may be lesser
> than capacity of fuse request or iov_iter. So fuse_get_user_pages() must
> ensure that *nbytesp won't grow.
>
> Now, when helper iov_iter_get_pages() performs all hard work of extracting
> pages from iov_iter, it can be done by passing properly calculated
> "maxsize" to the helper.
>
> The other caller of iov_iter_get_pages() (dio_refill_pages()) doesn't need
> this capability, so pass LONG_MAX as the maxsize argument here.
>
> Fixes: c9c37e2e6378 ("fuse: switch to iov_iter_get_pages()")
> Reported-by: Werner Baumann <werner.baumann@onlinehome.de>
> Tested-by: Maxim Patlasov <mpatlasov@parallels.com>
> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Applied, will be in tonight pull request.
prev parent reply other threads:[~2014-09-24 19:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-24 15:09 Miklos Szeredi
2014-09-24 19:01 ` Al Viro [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=20140924190156.GF7996@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--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
all inboxes | Powered by JetHome®