engines/xnvme: fix segfault issue with xnvme ioengine
authorAnkit Kumar <ankit.kumar@samsung.com>
Tue, 16 Aug 2022 05:38:20 +0000 (11:08 +0530)
committerJens Axboe <axboe@kernel.dk>
Tue, 16 Aug 2022 12:18:19 +0000 (06:18 -0600)
commitfdac9c68425a7bd4008614476a27e536b0b0bf8b
treeff4b03491d15faaf7fffb836f658570041f3779d
parenteeb302f9bfa4bbe121cae2a12a679c888164fc93
engines/xnvme: fix segfault issue with xnvme ioengine

fix segfault when xnvme ioengine is called without thread=1.
The segfault happens because td->io_ops_data is accessed at
two locations xnvme_fioe_cleanup and xnvme_fioe_iomem_free,
during the error handling call.

Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
Link: https://lore.kernel.org/r/20220816053821.440-2-ankit.kumar@samsung.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
engines/xnvme.c