Clear out transmit descriptor memory in fxp_attach when it's malloced.

fxp_stop is called as the first thing in fxp_init, and if the tx desc
list has junk in it, the system may panic. This bug showed up as a side
effect of the changes in rev 1.56, but has been in the code since the
beginning.
This commit is contained in:
David Greenman 1998-10-11 06:28:54 +00:00
parent 3c343fc067
commit 91aa9f9055
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=40206
2 changed files with 4 additions and 2 deletions

View File

@ -27,7 +27,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: if_fxp.c,v 1.55 1998/08/04 08:53:12 dg Exp $
* $Id: if_fxp.c,v 1.56 1998/10/10 19:26:40 dg Exp $
*/
/*
@ -641,6 +641,7 @@ fxp_attach_common(sc, enaddr)
M_DEVBUF, M_NOWAIT);
if (sc->cbl_base == NULL)
goto fail;
bzero(sc->cbl_base, sizeof(struct fxp_cb_tx) * FXP_NTXCB);
sc->fxp_stats = malloc(sizeof(struct fxp_stats), M_DEVBUF, M_NOWAIT);
if (sc->fxp_stats == NULL)

View File

@ -27,7 +27,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: if_fxp.c,v 1.55 1998/08/04 08:53:12 dg Exp $
* $Id: if_fxp.c,v 1.56 1998/10/10 19:26:40 dg Exp $
*/
/*
@ -641,6 +641,7 @@ fxp_attach_common(sc, enaddr)
M_DEVBUF, M_NOWAIT);
if (sc->cbl_base == NULL)
goto fail;
bzero(sc->cbl_base, sizeof(struct fxp_cb_tx) * FXP_NTXCB);
sc->fxp_stats = malloc(sizeof(struct fxp_stats), M_DEVBUF, M_NOWAIT);
if (sc->fxp_stats == NULL)