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

2020-09-09 Thread linmiaohe
Johannes Thumshirn wrote: >On 05/09/2020 11:41, Miaohe Lin wrote: >> When bio_add_hw_page() failed, we left page reference still held in pages. > >I'd add "from iov_iter_get_pages()" to the above sentence. > Sounds good. Will add it in v2. >Otherwise >Reviewed-by: Johannes Thumshirn Many Thank

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

2020-09-09 Thread Johannes Thumshirn
On 05/09/2020 11:41, Miaohe Lin wrote: > When bio_add_hw_page() failed, we left page reference still held in pages. I'd add "from iov_iter_get_pages()" to the above sentence. Otherwise Reviewed-by: Johannes Thumshirn

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

2020-09-05 Thread Miaohe Lin
When bio_add_hw_page() failed, we left page reference still held in pages. Release these references and advance the iov_iter according to what we have done successfully yet. Fixes: 0512a75b98f8 ("block: Introduce REQ_OP_ZONE_APPEND") Signed-off-by: Miaohe Lin --- block/bio.c | 12 +++- 1