[CFR] if_xl.c and if.c null pointer dereferences
From: Peter Pentchev (roam_at_ringlet.net)
Date: 07/26/04
- Previous message: James: "Re: device polling takes more CPU hits??"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 26 Jul 2004 22:13:44 +0300 To: net@FreeBSD.org
Hi,
A couple of days ago I was handed a new machine with a 3Com 905B card.
Before remembering the PNP OS option in the BIOS, I stumbled across a
couple of null pointer dereferences leading to kernel panics when
FreeBSD 4.10-STABLE could not map the card's resources and attempted to
"clean up" the driver state before it had enough state to begin with.
Attached are two patches, one to if_xl.c and one to if.c, which avoid
"cleaning up" data at pointers that have not been initialized yet.
Although this will not happen in normal operation, there's no need for
the kernel to panic instead of simply reporting that it could not get
the PCI resources it needs :)
G'luck,
Peter
-- Peter Pentchev roam@ringlet.net roam@cnsys.bg roam@FreeBSD.org PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 If this sentence were in Chinese, it would say something else.
- text/plain attachment: init-if.patch
- text/plain attachment: init-xl.patch
- application/pgp-signature attachment: stored
- Previous message: James: "Re: device polling takes more CPU hits??"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]