diff options
author | kato <kato@FreeBSD.org> | 1999-09-02 15:01:56 +0000 |
---|---|---|
committer | kato <kato@FreeBSD.org> | 1999-09-02 15:01:56 +0000 |
commit | 32707ed4fca52c7a5bcb73a62fe7f2d6db796916 (patch) | |
tree | 7d9e36c589a920311cbd0679442fb84de821114c /sys/i386 | |
parent | 68f5d86b7c493563330ea44efb5b1129a1b7dc46 (diff) | |
download | FreeBSD-src-32707ed4fca52c7a5bcb73a62fe7f2d6db796916.zip FreeBSD-src-32707ed4fca52c7a5bcb73a62fe7f2d6db796916.tar.gz |
The ed_probe_Novell should not clear id_maddr when it fails to probe.
This fixes potential panic by kvtop at addr == 0.
Submitted by: chi@bd.mbn.or.jp (Chiharu Shibata)
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/isa/if_ed.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/i386/isa/if_ed.c b/sys/i386/isa/if_ed.c index fed261a..f9c83e0 100644 --- a/sys/i386/isa/if_ed.c +++ b/sys/i386/isa/if_ed.c @@ -1282,10 +1282,14 @@ ed_probe_Novell(isa_dev) struct isa_device *isa_dev; { struct ed_softc *sc = &ed_softc[isa_dev->id_unit]; + int nports; - isa_dev->id_maddr = 0; - return ed_probe_Novell_generic(sc, isa_dev->id_iobase, + nports = ed_probe_Novell_generic(sc, isa_dev->id_iobase, isa_dev->id_unit, isa_dev->id_flags); + if (nports) + isa_dev->id_maddr = 0; + + return (nports); } #if NCARD > 0 |