Re: [PATCH] block: Fix potential page reference leak in __bio_iov_iter_get_pages()

2020-09-01 Thread linmiaohe
Christoph Hellwig wrote: >On Tue, Sep 01, 2020 at 08:00:06AM -0400, Miaohe Lin wrote: >> When bio is full, __bio_iov_iter_get_pages() would return error >> directly while left page reference still held in pages. Release these >> references. >> Also advance the iov_iter according to what we have

Re: [PATCH] block: Fix potential page reference leak in __bio_iov_iter_get_pages()

2020-09-01 Thread Christoph Hellwig
On Tue, Sep 01, 2020 at 08:00:06AM -0400, Miaohe Lin wrote: > When bio is full, __bio_iov_iter_get_pages() would return error directly > while left page reference still held in pages. Release these references. > Also advance the iov_iter according to what we have done successfully. > > Fixes:

[PATCH] block: Fix potential page reference leak in __bio_iov_iter_get_pages()

2020-09-01 Thread Miaohe Lin
When bio is full, __bio_iov_iter_get_pages() would return error directly while left page reference still held in pages. Release these references. Also advance the iov_iter according to what we have done successfully. Fixes: 576ed9135489 ("block: use bio_add_page in bio_iov_iter_get_pages")