[prev in list] [next in list] [prev in thread] [next in thread]
List: ocfs2-devel
Subject: Re: [Ocfs2-devel] [PATCH v7 01/19] iov_iter: Fix iov_iter_get_pages{, _alloc} page fault return valu
From: Christoph Hellwig <hch () infradead ! org>
Date: 2021-09-09 11:09:59
Message-ID: YTnrh2AUzActMoxl () infradead ! org
[Download RAW message or body]
On Fri, Aug 27, 2021 at 06:49:08PM +0200, Andreas Gruenbacher wrote:
> Both iov_iter_get_pages and iov_iter_get_pages_alloc return the number
> of bytes of the iovec they could get the pages for. When they cannot
> get any pages, they're supposed to return 0, but when the start of the
> iovec isn't page aligned, the calculation goes wrong and they return a
> negative value. Fix both functions.
>
> In addition, change iov_iter_get_pages_alloc to return NULL in that case
> to prevent resource leaks.
>
> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel@oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic