From: Christoph Hellwig <hch@infradead.org>
To: Zhiqiang Liu <liuzhiqiang26@huawei.com>
Cc: Jens Axboe <axboe@kernel.dk>,
linux-block@vger.kernel.org, jens.axboe@oracle.com,
namhyung@gmail.com, bharrosh@panasas.com,
renxudong <renxudong1@huawei.com>,
Mingfangsen <mingfangsen@huawei.com>,
zhengbin13@huawei.com, Guiyao <guiyao@huawei.com>
Subject: Re: [PATCH] blk-map: add kernel address validation in blk_rq_map_kern func
Date: Wed, 8 Jan 2020 05:31:53 -0800 [thread overview]
Message-ID: <20200108133153.GA4455@infradead.org> (raw)
In-Reply-To: <239c8928-aea0-abe9-a75d-dc3f1b573ec5@huawei.com>
On Mon, Dec 30, 2019 at 08:17:41PM +0800, Zhiqiang Liu wrote:
> + if (!len || !virt_addr_valid(kbuf))
While this is a somewhat useful sanity check, it should never triggger
except for a grave bug in the caller. So this needs a WARN_ON_ONCE
and a better explanation on how you triggered it, and most likely a
real fix for the caller.
next prev parent reply other threads:[~2020-01-08 13:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-30 12:17 [PATCH] blk-map: add kernel address validation in blk_rq_map_kern func Zhiqiang Liu
2020-01-07 2:38 ` Zhiqiang Liu
2020-01-07 4:05 ` Bob Liu
2020-01-07 6:51 ` renxudong
2020-01-08 15:07 ` Christoph Hellwig
2020-01-12 0:18 ` Bart Van Assche
2020-01-13 6:32 ` renxudong
2020-01-13 3:53 ` renxudong
2020-01-07 4:02 ` Jens Axboe
2020-01-08 13:31 ` Christoph Hellwig [this message]
2020-01-13 3:22 ` renxudong
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=20200108133153.GA4455@infradead.org \
--to=hch@infradead.org \
--cc=axboe@kernel.dk \
--cc=bharrosh@panasas.com \
--cc=guiyao@huawei.com \
--cc=jens.axboe@oracle.com \
--cc=linux-block@vger.kernel.org \
--cc=liuzhiqiang26@huawei.com \
--cc=mingfangsen@huawei.com \
--cc=namhyung@gmail.com \
--cc=renxudong1@huawei.com \
--cc=zhengbin13@huawei.com \
/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;
as well as URLs for NNTP newsgroup(s).