Re: [PATCH v7 01/19] iov_iter: Fix iov_iter_get_pages{,_alloc} page fault return value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>

Looks good,

Reviewed-by: Christoph Hellwig <hch@xxxxxx>



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux