summaryrefslogtreecommitdiffstats
path: root/sys/kern/uipc_syscalls.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/uipc_syscalls.c')
-rw-r--r--sys/kern/uipc_syscalls.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c
index d0ccfa0..e38bb90 100644
--- a/sys/kern/uipc_syscalls.c
+++ b/sys/kern/uipc_syscalls.c
@@ -673,7 +673,7 @@ sendit(td, s, mp, flags)
if (mp->msg_flags == MSG_COMPAT) {
register struct cmsghdr *cm;
- M_PREPEND(control, sizeof(*cm), 0);
+ M_PREPEND(control, sizeof(*cm), M_TRYWAIT);
if (control == 0) {
error = ENOBUFS;
goto bad;
@@ -691,7 +691,7 @@ sendit(td, s, mp, flags)
#ifdef KTRACE
if (KTRPOINT(td, KTR_GENIO)) {
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(auio.uio_iov, ktriov, iovlen);
ktruio = auio;
}
@@ -823,7 +823,7 @@ osendmsg(td, uap)
}
MALLOC(iov, struct iovec *,
sizeof(struct iovec) * (u_int)msg.msg_iovlen, M_IOV,
- 0);
+ M_WAITOK);
} else {
iov = aiov;
}
@@ -870,7 +870,7 @@ sendmsg(td, uap)
}
MALLOC(iov, struct iovec *,
sizeof(struct iovec) * (u_int)msg.msg_iovlen, M_IOV,
- 0);
+ M_WAITOK);
} else {
iov = aiov;
}
@@ -940,7 +940,7 @@ recvit(td, s, mp, namelenp)
#ifdef KTRACE
if (KTRPOINT(td, KTR_GENIO)) {
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(auio.uio_iov, ktriov, iovlen);
ktruio = auio;
}
@@ -1170,7 +1170,7 @@ orecvmsg(td, uap)
}
MALLOC(iov, struct iovec *,
sizeof(struct iovec) * (u_int)msg.msg_iovlen, M_IOV,
- 0);
+ M_WAITOK);
} else {
iov = aiov;
}
@@ -1221,7 +1221,7 @@ recvmsg(td, uap)
}
MALLOC(iov, struct iovec *,
sizeof(struct iovec) * (u_int)msg.msg_iovlen, M_IOV,
- 0);
+ M_WAITOK);
} else {
iov = aiov;
}
@@ -1557,7 +1557,7 @@ sockargs(mp, buf, buflen, type)
#endif
return (EINVAL);
}
- m = m_get(0, type);
+ m = m_get(M_TRYWAIT, type);
if (m == NULL)
return (ENOBUFS);
m->m_len = buflen;
@@ -1590,7 +1590,7 @@ getsockaddr(namp, uaddr, len)
if (len > SOCK_MAXADDRLEN)
return ENAMETOOLONG;
- MALLOC(sa, struct sockaddr *, len, M_SONAME, 0);
+ MALLOC(sa, struct sockaddr *, len, M_SONAME, M_WAITOK);
error = copyin(uaddr, sa, len);
if (error) {
FREE(sa, M_SONAME);
@@ -1804,7 +1804,7 @@ do_sendfile(struct thread *td, struct sendfile_args *uap, int compat)
/*
* Protect against multiple writers to the socket.
*/
- (void) sblock(&so->so_snd, 0);
+ (void) sblock(&so->so_snd, M_WAITOK);
/*
* Loop through the pages in the file, starting with the requested
@@ -1948,7 +1948,7 @@ retry_lookup:
/*
* Get an mbuf header and set it up as having external storage.
*/
- MGETHDR(m, 0, MT_DATA);
+ MGETHDR(m, M_TRYWAIT, MT_DATA);
if (m == NULL) {
error = ENOBUFS;
sf_buf_free((void *)sf->kva, NULL);
OpenPOWER on IntegriCloud