Commit 9b272982 authored by Eric Auger's avatar Eric Auger Committed by Yang Yingliang
Browse files

vfio/pci: Move dummy_resources_list init in vfio_pci_probe()



stable inclusion
from linux-4.19.165
commit 706a63e840d0ab86ecba189277f22f82e5356c63

--------------------------------

[ Upstream commit 16b8fe4c ]

In case an error occurs in vfio_pci_enable() before the call to
vfio_pci_probe_mmaps(), vfio_pci_disable() will  try to iterate
on an uninitialized list and cause a kernel panic.

Lets move to the initialization to vfio_pci_probe() to fix the
issue.

Signed-off-by: default avatarEric Auger <eric.auger@redhat.com>
Fixes: 05f0c03f ("vfio-pci: Allow to mmap sub-page MMIO BARs if the mmio page is exclusive")
CC: Stable <stable@vger.kernel.org> # v4.7+
Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: default avatarCheng Jian <cj.chengjian@huawei.com>
parent 584e7712
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment