PR kern/2141:
function ed_attach_NE2000_pci() in if_ed.c passes an uninitialized block of memory (got with malloc()) to ed_attach. This prevents a proper initialization of the device descriptor and in my case causes a panic during the probe, while printing out device info. Reviewed by: phk Submitted by: Luigi Rizzo <luigi@iet.unipi.it>
This commit is contained in:
parent
81afa0e644
commit
673f8923d0
@ -24,7 +24,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: if_ed.c,v 1.107 1996/10/17 13:42:13 nate Exp $
|
||||
* $Id: if_ed.c,v 1.108 1996/11/15 16:07:03 wollman Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -1782,6 +1782,7 @@ ed_attach_NE2000_pci(unit, port)
|
||||
if (!sc)
|
||||
return sc;
|
||||
|
||||
bzero(sc, sizeof *sc);
|
||||
if (ed_probe_Novell_generic(sc, port, unit, isa_flags) == 0
|
||||
|| ed_attach(sc, unit, isa_flags) == 0) {
|
||||
free(sc, M_DEVBUF);
|
||||
|
@ -24,7 +24,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: if_ed.c,v 1.107 1996/10/17 13:42:13 nate Exp $
|
||||
* $Id: if_ed.c,v 1.108 1996/11/15 16:07:03 wollman Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -1782,6 +1782,7 @@ ed_attach_NE2000_pci(unit, port)
|
||||
if (!sc)
|
||||
return sc;
|
||||
|
||||
bzero(sc, sizeof *sc);
|
||||
if (ed_probe_Novell_generic(sc, port, unit, isa_flags) == 0
|
||||
|| ed_attach(sc, unit, isa_flags) == 0) {
|
||||
free(sc, M_DEVBUF);
|
||||
|
Loading…
Reference in New Issue
Block a user