svn commit: r258505 - stable/10/sys/geom/nop
Mateusz Guzik
mjg at FreeBSD.org
Sat Nov 23 23:54:39 UTC 2013
Author: mjg
Date: Sat Nov 23 23:54:38 2013
New Revision: 258505
URL: http://svnweb.freebsd.org/changeset/base/258505
Log:
MFC r256951:
gnop: make sure that newly allocated memory for softc is zeroed
This prevents mtx_init from encountering non-zeros and panicking
the kernel as a result.
Approved by: re
Modified:
stable/10/sys/geom/nop/g_nop.c
Directory Properties:
stable/10/sys/ (props changed)
Modified: stable/10/sys/geom/nop/g_nop.c
==============================================================================
--- stable/10/sys/geom/nop/g_nop.c Sat Nov 23 18:58:17 2013 (r258504)
+++ stable/10/sys/geom/nop/g_nop.c Sat Nov 23 23:54:38 2013 (r258505)
@@ -214,7 +214,7 @@ g_nop_create(struct gctl_req *req, struc
}
}
gp = g_new_geomf(mp, "%s", name);
- sc = g_malloc(sizeof(*sc), M_WAITOK);
+ sc = g_malloc(sizeof(*sc), M_WAITOK | M_ZERO);
sc->sc_offset = offset;
sc->sc_explicitsize = explicitsize;
sc->sc_error = ioerror;
More information about the svn-src-stable
mailing list