diff options
author | mjg <mjg@FreeBSD.org> | 2013-11-23 23:54:38 +0000 |
---|---|---|
committer | mjg <mjg@FreeBSD.org> | 2013-11-23 23:54:38 +0000 |
commit | 8718fd5993f81309428c72b3679ceb00d4feab3d (patch) | |
tree | d22293e56651c2a873655836c4ae5665e109edc9 /sys/geom | |
parent | 2bbae61d51adf04fd3e9cd09cea906b5794f1f1d (diff) | |
download | FreeBSD-src-8718fd5993f81309428c72b3679ceb00d4feab3d.zip FreeBSD-src-8718fd5993f81309428c72b3679ceb00d4feab3d.tar.gz |
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
Diffstat (limited to 'sys/geom')
-rw-r--r-- | sys/geom/nop/g_nop.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/geom/nop/g_nop.c b/sys/geom/nop/g_nop.c index 0cb0374..a1a1ad1 100644 --- a/sys/geom/nop/g_nop.c +++ b/sys/geom/nop/g_nop.c @@ -214,7 +214,7 @@ g_nop_create(struct gctl_req *req, struct g_class *mp, struct g_provider *pp, } } 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; |