diff options
author | dg <dg@FreeBSD.org> | 1998-10-11 06:28:54 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1998-10-11 06:28:54 +0000 |
commit | 3bc215db7d7ede07c592612e203e54ee6918bf73 (patch) | |
tree | ef8d547aad01ae94890a3816f8c612b56b4d52d2 /sys/dev/fxp | |
parent | 9f6be4544f509927259a82167ec7218315a7bf97 (diff) | |
download | FreeBSD-src-3bc215db7d7ede07c592612e203e54ee6918bf73.zip FreeBSD-src-3bc215db7d7ede07c592612e203e54ee6918bf73.tar.gz |
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.
Diffstat (limited to 'sys/dev/fxp')
-rw-r--r-- | sys/dev/fxp/if_fxp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c index 50527d4..750e268 100644 --- a/sys/dev/fxp/if_fxp.c +++ b/sys/dev/fxp/if_fxp.c @@ -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) |