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. Reported by: Keith White <kwhite site.uottawa.ca>
This commit is contained in:
parent
79a210c1b3
commit
aa25ccfa36
@ -216,7 +216,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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user