]> xenbits.xensource.com Git - legacy/linux-2.6.18-xen.git/commit
pcifront: fix PCI reference leak
authorKeir Fraser <keir@xen.org>
Mon, 15 Nov 2010 09:32:57 +0000 (09:32 +0000)
committerKeir Fraser <keir@xen.org>
Mon, 15 Nov 2010 09:32:57 +0000 (09:32 +0000)
commitcc51dbdf0e254094c2494cfec8a1d46a770e70dd
tree0129dfcf7037cc7a9c82bb6b4dd303976092ab7d
parent8b6b7624725b2ff52b2708b72d89d518f41c4f48
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.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
From: Jiri Slaby <jslaby@suse.cz>
Subject: pcifront: fix potential NULL dereference

Milton spotted that we dereference NULL in one fail path in
pcifront_common_process. Fix that by using different device to print
out an error.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Milton Miller <miltonm@bga.com>
Signed-off-by: Jan Beulich <jbeulich@novell.com>
drivers/xen/pcifront/pci_op.c