diff options
Diffstat (limited to 'sys/kern/kern_descrip.c')
-rw-r--r-- | sys/kern/kern_descrip.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 342673e..97298d59 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -697,7 +697,7 @@ fsetown(pgid, sigiop) ret = 0; /* Allocate and fill in the new sigio out of locks. */ - MALLOC(sigio, struct sigio *, sizeof(struct sigio), M_SIGIO, 0); + MALLOC(sigio, struct sigio *, sizeof(struct sigio), M_SIGIO, M_WAITOK); sigio->sio_pgid = pgid; sigio->sio_ucred = crhold(curthread->td_ucred); sigio->sio_myref = sigiop; @@ -1082,7 +1082,7 @@ fdalloc(td, want, result) * than KMEM_ZMAX bytes. uma_large_malloc() requires Giant. */ mtx_lock(&Giant); - newofile = malloc(nfiles * OFILESIZE, M_FILEDESC, 0); + newofile = malloc(nfiles * OFILESIZE, M_FILEDESC, M_WAITOK); mtx_unlock(&Giant); /* @@ -1173,7 +1173,7 @@ falloc(td, resultfp, resultfd) struct file *fp, *fq; int error, i; - fp = uma_zalloc(file_zone, M_ZERO); + fp = uma_zalloc(file_zone, M_WAITOK | M_ZERO); sx_xlock(&filelist_lock); if (nfiles >= maxfiles) { sx_xunlock(&filelist_lock); @@ -1243,7 +1243,7 @@ fdinit(fdp) struct filedesc0 *newfdp; MALLOC(newfdp, struct filedesc0 *, sizeof(struct filedesc0), - M_FILEDESC, M_ZERO); + M_FILEDESC, M_WAITOK | M_ZERO); mtx_init(&newfdp->fd_fd.fd_mtx, FILEDESC_LOCK_DESC, NULL, MTX_DEF); newfdp->fd_fd.fd_cdir = fdp->fd_cdir; if (newfdp->fd_fd.fd_cdir) @@ -1299,7 +1299,7 @@ fdcopy(fdp) FILEDESC_UNLOCK(fdp); MALLOC(newfdp, struct filedesc *, sizeof(struct filedesc0), - M_FILEDESC, 0); + M_FILEDESC, M_WAITOK); FILEDESC_LOCK(fdp); bcopy(fdp, newfdp, sizeof(struct filedesc)); FILEDESC_UNLOCK(fdp); @@ -1339,7 +1339,7 @@ retry: i /= 2; FILEDESC_UNLOCK(fdp); MALLOC(newfdp->fd_ofiles, struct file **, i * OFILESIZE, - M_FILEDESC, 0); + M_FILEDESC, M_WAITOK); FILEDESC_LOCK(fdp); newfdp->fd_lastfile = fdp->fd_lastfile; newfdp->fd_nfiles = fdp->fd_nfiles; |