]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
xen/pciback: Check dev_data before using it
authorRoss Lagerwall <ross.lagerwall@citrix.com>
Fri, 14 Dec 2018 12:55:45 +0000 (12:55 +0000)
committerMarcelo Henrique Cerri <marcelo.cerri@canonical.com>
Fri, 17 Jan 2020 17:21:29 +0000 (14:21 -0300)
commite6622b647143b47610eda14b3cc53fdd18c7c31a
treeda3c6c7941162ce0994adcfd088a4ce4a7b45d37
parentcf144a22fffd9e28c20362dad45f99082c37dc3e
xen/pciback: Check dev_data before using it

BugLink: https://bugs.launchpad.net/bugs/1855787
[ Upstream commit 1669907e3d1abfa3f7586e2d55dbbc117b5adba2 ]

If pcistub_init_device fails, the release function will be called with
dev_data set to NULL.  Check it before using it to avoid a NULL pointer
dereference.

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/xen/xen-pciback/pci_stub.c