Re: [PATCH] 2.4.16 Fix NULL pointer dereferencing in agpgart_be.c

Robert Love (rml@tech9.net)
17 Dec 2001 14:16:18 -0500


On Mon, 2001-12-17 at 12:55, Marcelo Tosatti wrote:

> Well, Stephan, if you could send me only the part which fixes the oops for
> 2.4.17 then I'll be happy.

This patch is sufficient to prevent the oops (check for null pointer),
but as said the full patch from Nicolas is needed for completely correct
operation.

--- linux-2.4.17-rc1/drivers/char/agp/agpgart_be.c Sat Nov 17 03:11:22 2001
+++ linux/drivers/char/agp/agpgart_be.c Sat Dec 15 12:02:51 2001
@@ -3879,7 +3879,7 @@
i810_dev = pci_find_device(PCI_VENDOR_ID_INTEL,
PCI_DEVICE_ID_INTEL_830_M_1,
NULL);
- if(PCI_FUNC(i810_dev->devfn) != 0) {
+ if(i810_dev != NULL && PCI_FUNC(i810_dev->devfn) != 0) {
i810_dev = pci_find_device(PCI_VENDOR_ID_INTEL,
PCI_DEVICE_ID_INTEL_830_M_1,
i810_dev);

Robert Love

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/