vfio-pci/zdev: fix possible segmentation fault issue
stable inclusion from stable-5.10.20 commit 9eb145398e6fd31f1224a70a69db5ee0882210ec bugzilla: 50608 -------------------------------- [ Upstream commit 7e31d6dc ] In case allocation fails, we must behave correctly and exit with error. Fixes: e6b817d4 ("vfio-pci/zdev: Add zPCI capabilities to VFIO_DEVICE_GET_INFO") Signed-off-by: NMax Gurtovoy <mgurtovoy@nvidia.com> Reviewed-by: NCornelia Huck <cohuck@redhat.com> Reviewed-by: NMatthew Rosato <mjrosato@linux.ibm.com> Signed-off-by: NAlex Williamson <alex.williamson@redhat.com> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NChen Jun <chenjun102@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Showing
想要评论请 注册 或 登录