summaryrefslogtreecommitdiffstats
path: root/sys/sparc64
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2011-08-28 11:49:53 +0000
committermarius <marius@FreeBSD.org>2011-08-28 11:49:53 +0000
commitf93067d423d47174fe4e2ea18f8c995ab46972b4 (patch)
tree1c14cc7b4b15f9acdc6cd7be1a0f833198af9c01 /sys/sparc64
parentc2db418e2d23d525976a8a85103aac9f18391f33 (diff)
downloadFreeBSD-src-f93067d423d47174fe4e2ea18f8c995ab46972b4.zip
FreeBSD-src-f93067d423d47174fe4e2ea18f8c995ab46972b4.tar.gz
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. Approved by: re (kib) MFC after: 3 days
Diffstat (limited to 'sys/sparc64')
-rw-r--r--sys/sparc64/sbus/sbus.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/sparc64/sbus/sbus.c b/sys/sparc64/sbus/sbus.c
index 5cf7ad2..dbe3859 100644
--- a/sys/sparc64/sbus/sbus.c
+++ b/sys/sparc64/sbus/sbus.c
@@ -303,8 +303,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__);
/*
OpenPOWER on IntegriCloud