PERFORCE change 132229 for review
Kip Macy
kmacy at FreeBSD.org
Mon Dec 31 22:34:02 PST 2007
http://perforce.freebsd.org/chv.cgi?CH=132229
Change 132229 by kmacy at pandemonium:kmacy:xen31 on 2008/01/01 06:33:36
allocate zeroed memory for initial structures
we still only get interrupts on some of the boots :-(
Affected files ...
.. //depot/projects/xen31/sys/dev/xen/blkfront/blkfront.c#6 edit
Differences ...
==== //depot/projects/xen31/sys/dev/xen/blkfront/blkfront.c#6 (text+ko) ====
@@ -143,7 +143,7 @@
struct xb_softc *sc;
int error = 0;
- sc = (struct xb_softc *)malloc(sizeof(*sc), M_DEVBUF, M_WAITOK);
+ sc = (struct xb_softc *)malloc(sizeof(*sc), M_DEVBUF, M_WAITOK|M_ZERO);
sc->xb_unit = unit;
sc->xb_info = info;
info->sc = sc;
@@ -352,7 +352,7 @@
info->ring_ref = GRANT_INVALID_REF;
- sring = (blkif_sring_t *)malloc(PAGE_SIZE, M_DEVBUF, M_NOWAIT);
+ sring = (blkif_sring_t *)malloc(PAGE_SIZE, M_DEVBUF, M_NOWAIT|M_ZERO);
if (sring == NULL) {
xenbus_dev_fatal(dev, ENOMEM, "allocating shared ring");
return ENOMEM;
@@ -909,7 +909,7 @@
struct blk_shadow *copy;
/* Stage 1: Make a safe copy of the shadow state. */
- copy = (struct blk_shadow *)malloc(sizeof(info->shadow), M_DEVBUF, M_NOWAIT);
+ copy = (struct blk_shadow *)malloc(sizeof(info->shadow), M_DEVBUF, M_NOWAIT|M_ZERO);
PANIC_IF(copy == NULL);
memcpy(copy, info->shadow, sizeof(info->shadow));
More information about the p4-projects
mailing list