diff options
author | imp <imp@FreeBSD.org> | 2003-02-19 05:47:46 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2003-02-19 05:47:46 +0000 |
commit | cf874b345d0f766fb64cf4737e1c85ccc78d2bee (patch) | |
tree | 9e20e320fe15ae4bf68f8335fcf9d3e71d3b3614 /sys/compat | |
parent | b72619cecb8265d3efb3781b0acff1380762c173 (diff) | |
download | FreeBSD-src-cf874b345d0f766fb64cf4737e1c85ccc78d2bee.zip FreeBSD-src-cf874b345d0f766fb64cf4737e1c85ccc78d2bee.tar.gz |
Back out M_* changes, per decision of the TRB.
Approved by: trb
Diffstat (limited to 'sys/compat')
-rw-r--r-- | sys/compat/freebsd32/freebsd32_misc.c | 10 | ||||
-rw-r--r-- | sys/compat/linux/linux_file.c | 2 | ||||
-rw-r--r-- | sys/compat/linux/linux_getcwd.c | 4 | ||||
-rw-r--r-- | sys/compat/linux/linux_ioctl.c | 2 | ||||
-rw-r--r-- | sys/compat/linux/linux_mib.c | 2 | ||||
-rw-r--r-- | sys/compat/linux/linux_sysctl.c | 2 | ||||
-rw-r--r-- | sys/compat/linux/linux_util.c | 2 | ||||
-rw-r--r-- | sys/compat/pecoff/imgact_pecoff.c | 12 | ||||
-rw-r--r-- | sys/compat/svr4/svr4_filio.c | 2 | ||||
-rw-r--r-- | sys/compat/svr4/svr4_misc.c | 4 | ||||
-rw-r--r-- | sys/compat/svr4/svr4_socket.c | 2 | ||||
-rw-r--r-- | sys/compat/svr4/svr4_stream.c | 8 | ||||
-rw-r--r-- | sys/compat/svr4/svr4_sysvec.c | 2 |
13 files changed, 27 insertions, 27 deletions
diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index d593c04..c6f26fe 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -105,7 +105,7 @@ ia32_emul_find(td, sgp, prefix, path, pbuf, cflag) struct vattr vat; struct vattr vatroot; - buf = (char *) malloc(MAXPATHLEN, M_TEMP, 0); + buf = (char *) malloc(MAXPATHLEN, M_TEMP, M_WAITOK); *pbuf = path; for (ptr = buf; (*ptr = *prefix) != '\0'; ptr++, prefix++) @@ -768,8 +768,8 @@ ia32_readv(struct thread *td, struct ia32_readv_args *uap) osize = uap->iovcnt * sizeof (struct iovec32); nsize = uap->iovcnt * sizeof (struct iovec); - oio = malloc(osize, M_TEMP, 0); - nio = malloc(nsize, M_TEMP, 0); + oio = malloc(osize, M_TEMP, M_WAITOK); + nio = malloc(nsize, M_TEMP, M_WAITOK); error = 0; if ((error = copyin(uap->iovp, oio, osize))) @@ -814,8 +814,8 @@ ia32_writev(struct thread *td, struct ia32_writev_args *uap) osize = uap->iovcnt * sizeof (struct iovec32); nsize = uap->iovcnt * sizeof (struct iovec); - oio = malloc(osize, M_TEMP, 0); - nio = malloc(nsize, M_TEMP, 0); + oio = malloc(osize, M_TEMP, M_WAITOK); + nio = malloc(nsize, M_TEMP, M_WAITOK); error = 0; if ((error = copyin(uap->iovp, oio, osize))) diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index 160b2a9..2b37dcd 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -297,7 +297,7 @@ getdents_common(struct thread *td, struct linux_getdents64_args *args, buflen = max(LINUX_DIRBLKSIZ, nbytes); buflen = min(buflen, MAXBSIZE); - buf = malloc(buflen, M_TEMP, 0); + buf = malloc(buflen, M_TEMP, M_WAITOK); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td); again: diff --git a/sys/compat/linux/linux_getcwd.c b/sys/compat/linux/linux_getcwd.c index 81e84a3..bb1c28f 100644 --- a/sys/compat/linux/linux_getcwd.c +++ b/sys/compat/linux/linux_getcwd.c @@ -181,7 +181,7 @@ linux_getcwd_scandir(lvpp, uvpp, bpp, bufp, td) dirbuflen = DIRBLKSIZ; if (dirbuflen < va.va_blocksize) dirbuflen = va.va_blocksize; - dirbuf = (char *)malloc(dirbuflen, M_TEMP, 0); + dirbuf = (char *)malloc(dirbuflen, M_TEMP, M_WAITOK); #if 0 unionread: @@ -429,7 +429,7 @@ linux_getcwd(struct thread *td, struct linux_getcwd_args *args) else if (len < 2) return ERANGE; - path = (char *)malloc(len, M_TEMP, 0); + path = (char *)malloc(len, M_TEMP, M_WAITOK); error = kern___getcwd(td, path, UIO_SYSSPACE, len); if (!error) { diff --git a/sys/compat/linux/linux_ioctl.c b/sys/compat/linux/linux_ioctl.c index eb1b974..9f10ba5 100644 --- a/sys/compat/linux/linux_ioctl.c +++ b/sys/compat/linux/linux_ioctl.c @@ -2420,7 +2420,7 @@ linux_ioctl_register_handler(struct linux_ioctl_handler *h) } if (he == NULL) { MALLOC(he, struct handler_element *, sizeof(*he), - M_LINUX, 0); + M_LINUX, M_WAITOK); he->func = h->func; } else TAILQ_REMOVE(&handlers, he, list); diff --git a/sys/compat/linux/linux_mib.c b/sys/compat/linux/linux_mib.c index 4f7f199..d9cdd07 100644 --- a/sys/compat/linux/linux_mib.c +++ b/sys/compat/linux/linux_mib.c @@ -139,7 +139,7 @@ linux_get_prison(struct proc *p) if (pr->pr_linux == NULL) { mtx_unlock(&pr->pr_mtx); MALLOC(lpr, struct linux_prison *, sizeof *lpr, - M_PRISON, M_ZERO); + M_PRISON, M_WAITOK|M_ZERO); mtx_lock(&pr->pr_mtx); if (pr->pr_linux == NULL) { pr->pr_linux = lpr; diff --git a/sys/compat/linux/linux_sysctl.c b/sys/compat/linux/linux_sysctl.c index d737f55..699b5d6 100644 --- a/sys/compat/linux/linux_sysctl.c +++ b/sys/compat/linux/linux_sysctl.c @@ -92,7 +92,7 @@ linux_sysctl(struct thread *td, struct linux_sysctl_args *args) if (la.nlen <= 0 || la.nlen > LINUX_CTL_MAXNAME) return (ENOTDIR); - mib = malloc(la.nlen * sizeof(l_int), M_TEMP, 0); + mib = malloc(la.nlen * sizeof(l_int), M_TEMP, M_WAITOK); error = copyin(la.name, mib, la.nlen * sizeof(l_int)); if (error) { free(mib, M_TEMP); diff --git a/sys/compat/linux/linux_util.c b/sys/compat/linux/linux_util.c index bd2c81d..5bd8c15 100644 --- a/sys/compat/linux/linux_util.c +++ b/sys/compat/linux/linux_util.c @@ -101,7 +101,7 @@ linux_emul_convpath(td, path, pathseg, pbuf, cflag) char *ptr, *buf, *cp; size_t len, sz; - buf = (char *) malloc(MAXPATHLEN, M_TEMP, 0); + buf = (char *) malloc(MAXPATHLEN, M_TEMP, M_WAITOK); *pbuf = buf; prefix = linux_emul_path; diff --git a/sys/compat/pecoff/imgact_pecoff.c b/sys/compat/pecoff/imgact_pecoff.c index b15e5c6..fd9ab26 100644 --- a/sys/compat/pecoff/imgact_pecoff.c +++ b/sys/compat/pecoff/imgact_pecoff.c @@ -184,7 +184,7 @@ pecoff_coredump(register struct thread * td, register struct vnode * vp, limit) return (EFAULT); tempuser = malloc(ctob(uarea_pages + kstack_pages), M_TEMP, - M_ZERO); + M_WAITOK | M_ZERO); if (tempuser == NULL) return (ENOMEM); PROC_LOCK(p); @@ -393,7 +393,7 @@ pecoff_load_file(struct thread * td, const char *file, u_long * addr, u_long * e goto fail; if ((error = pecoff_signature(td, imgp->vp, &dh) != 0)) goto fail; - fp = malloc(PECOFF_HDR_SIZE, M_TEMP, 0); + fp = malloc(PECOFF_HDR_SIZE, M_TEMP, M_WAITOK); peofs = dh.d_peofs + sizeof(signature) - 1; if ((error = pecoff_read_from(td, imgp->vp, peofs, (caddr_t) fp, PECOFF_HDR_SIZE) != 0)) goto fail; @@ -405,7 +405,7 @@ pecoff_load_file(struct thread * td, const char *file, u_long * addr, u_long * e wp = (void *) ((char *) ap + sizeof(struct coff_aouthdr)); /* read section header */ scnsiz = sizeof(struct coff_scnhdr) * fp->f_nscns; - sh = malloc(scnsiz, M_TEMP, 0); + sh = malloc(scnsiz, M_TEMP, M_WAITOK); if ((error = pecoff_read_from(td, imgp->vp, peofs + PECOFF_HDR_SIZE, (caddr_t) sh, scnsiz)) != 0) goto fail; @@ -481,7 +481,7 @@ exec_pecoff_coff_prep_zmagic(struct image_params * imgp, struct vmspace *vmspace; struct pecoff_args *argp = NULL; - sh = malloc(scnsiz, M_TEMP, 0); + sh = malloc(scnsiz, M_TEMP, M_WAITOK); wp = (void *) ((char *) ap + sizeof(struct coff_aouthdr)); error = pecoff_read_from(FIRST_THREAD_IN_PROC(imgp->proc), imgp->vp, @@ -529,7 +529,7 @@ exec_pecoff_coff_prep_zmagic(struct image_params * imgp, vmspace->vm_taddr = (caddr_t) (uintptr_t) text_addr; vmspace->vm_dsize = data_size >> PAGE_SHIFT; vmspace->vm_daddr = (caddr_t) (uintptr_t) data_addr; - argp = malloc(sizeof(struct pecoff_args), M_TEMP, 0); + argp = malloc(sizeof(struct pecoff_args), M_TEMP, M_WAITOK); if (argp == NULL) { error = ENOMEM; goto fail; @@ -659,7 +659,7 @@ imgact_pecoff(struct image_params * imgp) VOP_UNLOCK(imgp->vp, 0, td); peofs = dp->d_peofs + sizeof(signature) - 1; - fp = malloc(PECOFF_HDR_SIZE, M_TEMP, 0); + fp = malloc(PECOFF_HDR_SIZE, M_TEMP, M_WAITOK); error = pecoff_read_from(FIRST_THREAD_IN_PROC(imgp->proc), imgp->vp, peofs, (caddr_t) fp, PECOFF_HDR_SIZE); if (error) diff --git a/sys/compat/svr4/svr4_filio.c b/sys/compat/svr4/svr4_filio.c index ab98dce..ca1b8db 100644 --- a/sys/compat/svr4/svr4_filio.c +++ b/sys/compat/svr4/svr4_filio.c @@ -68,7 +68,7 @@ svr4_sys_poll(td, uap) pa.timeout = uap->timeout; siz = uap->nfds * sizeof(struct pollfd); - pfd = (struct pollfd *)malloc(siz, M_TEMP, 0); + pfd = (struct pollfd *)malloc(siz, M_TEMP, M_WAITOK); error = poll(td, (struct poll_args *)uap); diff --git a/sys/compat/svr4/svr4_misc.c b/sys/compat/svr4/svr4_misc.c index 5938993..2db3c96 100644 --- a/sys/compat/svr4/svr4_misc.c +++ b/sys/compat/svr4/svr4_misc.c @@ -296,7 +296,7 @@ svr4_sys_getdents64(td, uap) #define DIRBLKSIZ 512 /* XXX we used to use ufs's DIRBLKSIZ */ buflen = max(DIRBLKSIZ, nbytes); buflen = min(buflen, MAXBSIZE); - buf = malloc(buflen, M_TEMP, 0); + buf = malloc(buflen, M_TEMP, M_WAITOK); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td); again: aiov.iov_base = buf; @@ -459,7 +459,7 @@ svr4_sys_getdents(td, uap) } buflen = min(MAXBSIZE, uap->nbytes); - buf = malloc(buflen, M_TEMP, 0); + buf = malloc(buflen, M_TEMP, M_WAITOK); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td); off = fp->f_offset; again: diff --git a/sys/compat/svr4/svr4_socket.c b/sys/compat/svr4/svr4_socket.c index 54274f9..b5da396 100644 --- a/sys/compat/svr4/svr4_socket.c +++ b/sys/compat/svr4/svr4_socket.c @@ -138,7 +138,7 @@ svr4_add_socket(td, path, st) atomic_store_rel_int(&svr4_str_initialized, 2); } - e = malloc(sizeof(*e), M_TEMP, 0); + e = malloc(sizeof(*e), M_TEMP, M_WAITOK); e->cookie = NULL; e->dev = st->st_dev; e->ino = st->st_ino; diff --git a/sys/compat/svr4/svr4_stream.c b/sys/compat/svr4/svr4_stream.c index ce2b68a..95d67cd 100644 --- a/sys/compat/svr4/svr4_stream.c +++ b/sys/compat/svr4/svr4_stream.c @@ -212,7 +212,7 @@ svr4_sendit(td, s, mp, flags) if (KTRPOINT(td, KTR_GENIO)) { int iovlen = auio.uio_iovcnt * sizeof (struct iovec); - MALLOC(ktriov, struct iovec *, iovlen, M_TEMP, 0); + MALLOC(ktriov, struct iovec *, iovlen, M_TEMP, M_WAITOK); bcopy((caddr_t)auio.uio_iov, (caddr_t)ktriov, iovlen); ktruio = auio; } @@ -297,7 +297,7 @@ svr4_recvit(td, s, mp, namelenp) if (KTRPOINT(td, KTR_GENIO)) { int iovlen = auio.uio_iovcnt * sizeof (struct iovec); - MALLOC(ktriov, struct iovec *, iovlen, M_TEMP, 0); + MALLOC(ktriov, struct iovec *, iovlen, M_TEMP, M_WAITOK); bcopy((caddr_t)auio.uio_iov, (caddr_t)ktriov, iovlen); ktruio = auio; } @@ -405,7 +405,7 @@ show_ioc(str, ioc) const char *str; struct svr4_strioctl *ioc; { - u_char *ptr = (u_char *) malloc(ioc->len, M_TEMP, 0); + u_char *ptr = (u_char *) malloc(ioc->len, M_TEMP, M_WAITOK); int error; uprintf("%s cmd = %ld, timeout = %d, len = %d, buf = %p { ", @@ -441,7 +441,7 @@ show_strbuf(str) len = maxlen; if (len > 0) { - ptr = (u_char *) malloc(len, M_TEMP, 0); + ptr = (u_char *) malloc(len, M_TEMP, M_WAITOK); if ((error = copyin(str->buf, ptr, len)) != 0) { free((char *) ptr, M_TEMP); diff --git a/sys/compat/svr4/svr4_sysvec.c b/sys/compat/svr4/svr4_sysvec.c index 508e9dc..1d4ad6e 100644 --- a/sys/compat/svr4/svr4_sysvec.c +++ b/sys/compat/svr4/svr4_sysvec.c @@ -267,7 +267,7 @@ svr4_emul_find(td, sgp, prefix, path, pbuf, cflag) char *ptr, *buf, *cp; size_t sz, len; - buf = (char *) malloc(MAXPATHLEN, M_TEMP, 0); + buf = (char *) malloc(MAXPATHLEN, M_TEMP, M_WAITOK); *pbuf = path; for (ptr = buf; (*ptr = *prefix) != '\0'; ptr++, prefix++) |