linux/drivers/nvme/target
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>
History 2025-07-10 16:04:49 +02:00
..
admin-cmd.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
auth.c block-6.12-20241101 2024-11-01 13:41:55 -10:00
configfs.c nvmet: Don't overflow subsysnqn 2025-01-09 13:33:40 +01:00
core.c nvme: fix command limits status code 2025-06-19 15:32:18 +02:00
debugfs.c objtool, nvmet: Fix out-of-bounds stack access in nvmet_ctrl_state_show() 2025-04-10 14:39:26 +02:00
debugfs.h nvmet: add debugfs support 2024-06-24 12:53:42 -07:00
discovery.c nvme: rename CDR/MORE/DNR to NVME_STATUS_* 2024-06-24 12:53:42 -07:00
fabrics-cmd-auth.c for-6.11/block-20240710 2024-07-15 14:20:22 -07:00
fabrics-cmd.c for-6.11/block-20240710 2024-07-15 14:20:22 -07:00
fc.c nvmet-fc: put ref when assoc->del_work is already scheduled 2025-05-02 07:59:24 +02:00
fcloop.c nvmet-fcloop: access fcpreq only when holding reqlock 2025-06-19 15:32:32 +02:00
io-cmd-bdev.c nvme: fix command limits status code 2025-06-19 15:32:18 +02:00
io-cmd-file.c nvmet: use bvec_set_page to initialize bvecs 2023-02-03 08:20:55 -07:00
Kconfig nvmet-tcp: select CONFIG_TLS from CONFIG_NVME_TARGET_TCP_TLS 2025-05-09 09:50:46 +02:00
loop.c nvme-loop: flush off pending I/O while shutting down loop controller 2024-10-17 11:07:37 -07:00
Makefile nvmet: add debugfs support 2024-06-24 12:53:42 -07:00
nvmet.h nvmet: fix memory leak of bio integrity 2025-07-10 16:04:49 +02:00
passthru.c nvmet-passthru: clear EUID/NGUID/UUID while using loop target 2024-10-01 11:08:40 -07:00
rdma.c nvmet-rdma: recheck queue state is LIVE in state lock in recv done 2025-03-22 12:54:19 -07:00
tcp.c nvmet-tcp: don't restore null sk_state_change 2025-05-29 11:03:11 +02:00
trace.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
trace.h nvme: trace: avoid memcpy overflow warning 2024-01-05 13:16:18 -08:00
zns.c nvme: rename CDR/MORE/DNR to NVME_STATUS_* 2024-06-24 12:53:42 -07:00