]> www.infradead.org Git - nvme.git/commit
nvme: avoid double free special payload
authorChunguang Xu <chunguang.xu@shopee.com>
Tue, 11 Jun 2024 10:02:08 +0000 (18:02 +0800)
committerKeith Busch <kbusch@kernel.org>
Wed, 12 Jun 2024 17:56:50 +0000 (10:56 -0700)
commite5d574ab37f5f2e7937405613d9b1a724811e5ad
tree1cf2ca72fc6ae3a8b9164aac69b05329f13718ff
parentb1a1fdd7096dd2d67911b07f8118ff113d815db4
nvme: avoid double free special payload

If a discard request needs to be retried, and that retry may fail before
a new special payload is added, a double free will result. Clear the
RQF_SPECIAL_LOAD when the request is cleaned.

Signed-off-by: Chunguang Xu <chunguang.xu@shopee.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Max Gurtovoy <mgurtovoy@nvidia.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/host/core.c