linux-yocto/drivers/nvme
Dmitry Bogdanov 431e58d56f nvmet: fix memory leak of bio integrity
[ Upstream commit 190f4c2c86 ]

If nvmet receives commands with metadata there is a continuous memory
leak of kmalloc-128 slab or more precisely bio->bi_integrity.

Since commit bf4c89fc87 ("block: don't call bio_uninit from bio_endio")
each user of bio_init has to use bio_uninit as well. Otherwise the bio
integrity is not getting free. Nvmet uses bio_init for inline bios.

Uninit the inline bio to complete deallocation of integrity in bio.

Fixes: bf4c89fc87 ("block: don't call bio_uninit from bio_endio")
Signed-off-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-07-10 16:04:49 +02:00
..
common move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
host nvme: Fix incorrect cdw15 value in passthru error logging 2025-07-10 16:04:49 +02:00
target nvmet: fix memory leak of bio integrity 2025-07-10 16:04:49 +02:00
Kconfig
Makefile nvme: common: make keyring and auth separate modules 2023-11-07 10:05:15 -08:00