]> git.baikalelectronics.ru Git - kernel.git/commit
xen-pcifront: fix PCI reference leak
authorJiri Slaby <jslaby@suse.cz>
Thu, 4 Nov 2010 14:31:30 +0000 (15:31 +0100)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Mon, 8 Nov 2010 16:41:15 +0000 (11:41 -0500)
commit7efe1aeb14b843a4c8637499d7aa814dd247f907
treeee4de02c580b1e41eed25242b0e978d2a1ed1359
parent9807d0e9b09654e3f9c045b7fdcde4f646077e48
xen-pcifront: fix PCI reference leak

Stanse found that when pdev is found and has no driver a reference is
leaked in pcifront_common_process. So add pci_dev_put there. For the
pdev == NULL case, pci_dev_put(NULL) is fine.

[v2: Updated to not dereference pcidev->dev per Milton's observation]

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Milton Miller <miltonm@bga.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
drivers/pci/xen-pcifront.c