svn commit: r225333 - stable/7/sys/sparc64/sbus
Marius Strobl
marius at FreeBSD.org
Fri Sep 2 16:18:07 UTC 2011
Author: marius
Date: Fri Sep 2 16:18:06 2011
New Revision: 225333
URL: http://svn.freebsd.org/changeset/base/225333
Log:
MFC: r225229
Since r221218 rman_manage_region(9) actually honors rm_start and rm_end
which may cause problems when these contain garbage so zero the range
descriptors embedding the rmans when allocating them.
Modified:
stable/7/sys/sparc64/sbus/sbus.c
Directory Properties:
stable/7/sys/ (props changed)
stable/7/sys/cddl/contrib/opensolaris/ (props changed)
stable/7/sys/contrib/dev/acpica/ (props changed)
stable/7/sys/contrib/pf/ (props changed)
Modified: stable/7/sys/sparc64/sbus/sbus.c
==============================================================================
--- stable/7/sys/sparc64/sbus/sbus.c Fri Sep 2 16:17:52 2011 (r225332)
+++ stable/7/sys/sparc64/sbus/sbus.c Fri Sep 2 16:18:06 2011 (r225333)
@@ -348,8 +348,8 @@ sbus_attach(device_t dev)
sizeof(*range), (void **)&range)) == -1) {
panic("%s: error getting ranges property", __func__);
}
- sc->sc_rd = (struct sbus_rd *)malloc(sizeof(*sc->sc_rd) * sc->sc_nrange,
- M_DEVBUF, M_NOWAIT);
+ sc->sc_rd = malloc(sizeof(*sc->sc_rd) * sc->sc_nrange, M_DEVBUF,
+ M_NOWAIT | M_ZERO);
if (sc->sc_rd == NULL)
panic("%s: cannot allocate rmans", __func__);
/*
More information about the svn-src-all
mailing list