]> git.baikalelectronics.ru Git - kernel.git/commit
nvmet-tcp: fix memory leak when performing a controller reset
authorMaurizio Lombardi <mlombard@redhat.com>
Tue, 16 Nov 2021 15:49:20 +0000 (16:49 +0100)
committerChristoph Hellwig <hch@lst.de>
Tue, 23 Nov 2021 16:19:25 +0000 (17:19 +0100)
commit9624cc1609bf59612f33a6d076a639ca52133b86
tree6d01107c0b484593cc706a8d01bb872464c31de7
parentb3a53a1919efb7f5aed04d826921d1d0ff0297a4
nvmet-tcp: fix memory leak when performing a controller reset

If a reset controller is executed while the initiator
is performing some I/O the driver may leak the memory allocated
for the commands' iovec.

Make sure that nvmet_tcp_uninit_data_in_cmds() releases
all the memory.

Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: John Meneghini <jmeneghi@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/target/tcp.c