From: linmiaohe <linmiaohe@huawei.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: "axboe@kernel.dk" <axboe@kernel.dk>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] block: Fix potential page reference leak in __bio_iov_iter_get_pages()
Date: Wed, 2 Sep 2020 01:46:32 +0000 [thread overview]
Message-ID: <7fa19b78076e400f8f51c563746d697d@huawei.com> (raw)
Christoph Hellwig <hch@infradead.org> 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 done successfully.
>>
>> Fixes: 576ed9135489 ("block: use bio_add_page in
>> bio_iov_iter_get_pages")
>> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
>
>The WARN_ON means something is fundamentally wrong here. I think a few leaked pages are the least of our problems in this case.
Yes, WARN_ON means something is fundamentally wrong here. But IMO it's not really a big problem when bio is full.
We should not simply rely on this WARN_ON and we can handle this gracefully.
Thanks.
next reply other threads:[~2020-09-02 1:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-02 1:46 linmiaohe [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-09-01 12:00 Miaohe Lin
2020-09-01 16:09 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7fa19b78076e400f8f51c563746d697d@huawei.com \
--to=linmiaohe@huawei.com \
--cc=axboe@kernel.dk \
--cc=hch@infradead.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®