Commit 0a256620 authored by Max Gurtovoy's avatar Max Gurtovoy Committed by Zheng Zengkai
Browse files

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: default avatarMax Gurtovoy <mgurtovoy@nvidia.com>
Reviewed-by: default avatarCornelia Huck <cohuck@redhat.com>
Reviewed-by: default avatarMatthew Rosato <mjrosato@linux.ibm.com>
Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Acked-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent c64d8815
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment