dm integrity: call kmem_cache_destroy() in dm_integrity_init() error path
authorMike Snitzer <snitzer@kernel.org>
Tue, 4 Apr 2023 17:34:28 +0000 (13:34 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 May 2023 14:03:41 +0000 (23:03 +0900)
commit3877b5c1509b16eeb1f275228fd91789cd88cf17
treee0ad8db528fff20b006f994289e4423b5608e159
parent21d5198c210c3c8768be8f7e0c1e6dff6ea7259d
dm integrity: call kmem_cache_destroy() in dm_integrity_init() error path

commit 6b79a428c02769f2a11f8ae76bf866226d134887 upstream.

Otherwise the journal_io_cache will leak if dm_register_target() fails.

Cc: stable@vger.kernel.org
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/dm-integrity.c