Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9ac0ce8596b17093739d42721cc8a616cedf734b Commit: 9ac0ce8596b17093739d42721cc8a616cedf734b Parent: 1597cacbe39802d86656d1f2e6329895bd2ef531 Author: Jesper Juhl <[EMAIL PROTECTED]> AuthorDate: Mon Dec 4 15:14:48 2006 -0800 Committer: Greg Kroah-Hartman <[EMAIL PROTECTED]> CommitDate: Wed Dec 20 10:54:43 2006 -0800
PCI: Be a bit defensive in quirk_nvidia_ck804() so we don't risk dereferencing a NULL pdev. pci_get_slot() may return NULL if nothing was found. quirk_nvidia_ck804() does not check the value returned from pci_get_slot(), so it may end up causing a NULL pointer deref. Signed-off-by: Jesper Juhl <[EMAIL PROTECTED]> Acked-by: Alan Cox <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]> --- drivers/pci/quirks.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 30c41fc..8a2db01 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -1743,6 +1743,8 @@ static void __devinit quirk_nvidia_ck804_msi_ht_cap(struct pci_dev *dev) * a single one having MSI is enough to be sure that MSI are supported. */ pdev = pci_get_slot(dev->bus, 0); + if (!pdev) + return; if (!msi_ht_cap_enabled(dev) && !msi_ht_cap_enabled(pdev)) { printk(KERN_WARNING "PCI: MSI quirk detected. " "MSI disabled on chipset %s.\n", - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html