summaryrefslogtreecommitdiffstats
path: root/sys/dev/md/md.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/md/md.c')
-rw-r--r--sys/dev/md/md.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c
index 75f76ee..591cd64 100644
--- a/sys/dev/md/md.c
+++ b/sys/dev/md/md.c
@@ -658,7 +658,7 @@ mdnew(int unit)
unit = max + 1;
if (unit > 255)
return (NULL);
- sc = (struct md_s *)malloc(sizeof *sc, M_MD, M_ZERO);
+ sc = (struct md_s *)malloc(sizeof *sc, M_MD, M_WAITOK | M_ZERO);
sc->unit = unit;
bioq_init(&sc->bio_queue);
mtx_init(&sc->queue_mtx, "md bio queue", NULL, MTX_DEF);
@@ -815,7 +815,7 @@ mdsetcred(struct md_s *sc, struct ucred *cred)
struct uio auio;
struct iovec aiov;
- tmpbuf = malloc(sc->secsize, M_TEMP, 0);
+ tmpbuf = malloc(sc->secsize, M_TEMP, M_WAITOK);
bzero(&auio, sizeof(auio));
aiov.iov_base = tmpbuf;
OpenPOWER on IntegriCloud