[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1288896353-32620-1-git-send-email-jslaby@suse.cz>
Date: Thu, 4 Nov 2010 19:45:53 +0100
From: Jiri Slaby <jslaby@...e.cz>
To: jbarnes@...tuousgeek.org
Cc: linux-pci@...r.kernel.org, xen-devel@...ts.xensource.com,
konrad.wilk@...cle.com, linux-kernel@...r.kernel.org,
jirislaby@...il.com, Milton Miller <miltonm@....com>
Subject: [PATCH 1/1] PCI: xen-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@...e.cz>
Cc: Milton Miller <miltonm@....com>
---
drivers/pci/xen-pcifront.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/pci/xen-pcifront.c b/drivers/pci/xen-pcifront.c
index f9ffc05..1a56067 100644
--- a/drivers/pci/xen-pcifront.c
+++ b/drivers/pci/xen-pcifront.c
@@ -576,8 +576,7 @@ static pci_ers_result_t pcifront_common_process(int cmd,
pcidev = pci_get_bus_and_slot(bus, devfn);
if (!pcidev || !pcidev->driver) {
- dev_err(&pcidev->dev,
- "device or driver is NULL\n");
+ dev_err(&pdev->xdev->dev, "AER device or driver is NULL\n");
pci_dev_put(pcidev);
return result;
}
--
1.7.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists