Date: Fri, 2 Sep 2011 16:17:52 +0000 (UTC) From: Marius Strobl <marius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r225332 - stable/8/sys/sparc64/sbus Message-ID: <201109021617.p82GHqDh006497@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: marius Date: Fri Sep 2 16:17:52 2011 New Revision: 225332 URL: http://svn.freebsd.org/changeset/base/225332 Log: MFC: r225229 Since r221218 (MFC'ed to stable/8 in r223500) 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/8/sys/sparc64/sbus/sbus.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/sparc64/sbus/sbus.c ============================================================================== --- stable/8/sys/sparc64/sbus/sbus.c Fri Sep 2 16:00:51 2011 (r225331) +++ stable/8/sys/sparc64/sbus/sbus.c Fri Sep 2 16:17:52 2011 (r225332) @@ -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__); /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201109021617.p82GHqDh006497>