summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authormsmith <msmith@FreeBSD.org>1996-11-05 05:52:36 +0000
committermsmith <msmith@FreeBSD.org>1996-11-05 05:52:36 +0000
commit44ef0011d8ce3b34eca6371853853e48c23c9fae (patch)
tree421fbf69b9ccebfd2bb190ba5fb07955ef57b922 /sys
parent07204dc9b0ffa3832b69aa764ade8597e781dcd7 (diff)
downloadFreeBSD-src-44ef0011d8ce3b34eca6371853853e48c23c9fae.zip
FreeBSD-src-44ef0011d8ce3b34eca6371853853e48c23c9fae.tar.gz
Protect against PCI devices which may have their 'changed' flag set,
or list items which may look like devices but which don't have an isa_device structure attached to them. This _shouldn't_ be possible, but it appears to have been observed-by: Joerg
Diffstat (limited to 'sys')
-rw-r--r--sys/i386/i386/userconfig.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/i386/i386/userconfig.c b/sys/i386/i386/userconfig.c
index 3f7b3d0..bdaf8b1 100644
--- a/sys/i386/i386/userconfig.c
+++ b/sys/i386/i386/userconfig.c
@@ -46,7 +46,7 @@
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**
- ** $Id: userconfig.c,v 1.62 1996/10/28 17:14:58 imp Exp $
+ ** $Id: userconfig.c,v 1.63 1996/10/30 21:40:15 julian Exp $
**/
/**
@@ -674,6 +674,10 @@ savelist(DEV_LIST *list, int active)
{
if ((list->comment == DEV_DEVICE) && list->changed)
{
+ if ((list->iobase == -2) || /* is a PCI device; can't save */
+ (list->device == NULL)) /* no isa_device associated at all?! */
+ continue;
+
setdev(list,active); /* set the device itself */
id_pn = NULL;
@@ -2212,7 +2216,7 @@ visuserconfig(void)
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: userconfig.c,v 1.62 1996/10/28 17:14:58 imp Exp $
+ * $Id: userconfig.c,v 1.63 1996/10/30 21:40:15 julian Exp $
*/
#include "scbus.h"
OpenPOWER on IntegriCloud