[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20140924190156.GF7996@ZenIV.linux.org.uk>
Date: Wed, 24 Sep 2014 20:01:56 +0100
From: Al Viro <viro@...IV.linux.org.uk>
To: Miklos Szeredi <miklos@...redi.hu>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH] fuse: honour max_read and max_write in direct_io mode
On Wed, Sep 24, 2014 at 05:09:11PM +0200, Miklos Szeredi wrote:
> From: Miklos Szeredi <mszeredi@...e.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@...inehome.de>
> Tested-by: Maxim Patlasov <mpatlasov@...allels.com>
> Signed-off-by: Miklos Szeredi <mszeredi@...e.cz>
Applied, will be in tonight pull request.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists