nvme-loop: fix memory leak in nvme_loop_create_ctrl()
mainline inclusion from mainline-v5.13-rc3 commit 03504e3b category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/I956G7 CVE: CVE-2021-47074 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=03504e3b54cc8118cc26c064e60a0b00c2308708 -------------------------------- When creating loop ctrl in nvme_loop_create_ctrl(), if nvme_init_ctrl() fails, the loop ctrl should be freed before jumping to the "out" label. Fixes: 3a85a5de ("nvme-loop: add a NVMe loopback host driver") Signed-off-by:Wu Bo <wubo40@huawei.com> Signed-off-by:
Christoph Hellwig <hch@lst.de> Conflict: In mainline, commit 64d452b3 and b6cec06d changed context. Does not affect the logic of this patch. Signed-off-by:
Li Nan <linan122@huawei.com>
Loading
Please sign in to comment