Permalink
Browse files

kernel: Fix a few more mbuf MB_* vs. kmalloc M_* flag misuses.

  • Loading branch information...
1 parent 8a014a4 commit 5113665d247a66868f45dfc59719c9e59b98f9c1 @ntunes ntunes committed Oct 2, 2012
Showing with 5 additions and 7 deletions.
  1. +1 −1 sys/dev/netif/msk/if_msk.c
  2. +1 −3 sys/netgraph7/atm/ngatmbase.c
  3. +3 −3 sys/netinet/sctp_output.c
@@ -773,7 +773,7 @@ msk_jumbo_newbuf(struct msk_if_softc *sc_if, int idx)
int nsegs;
void *buf;
- MGETHDR(m, M_DONTWAIT, MT_DATA);
+ MGETHDR(m, MB_DONTWAIT, MT_DATA);
if (m == NULL)
return (ENOBUFS);
buf = msk_jalloc(sc_if);
@@ -29,8 +29,6 @@
* In-kernel UNI stack message functions.
*
* $FreeBSD: src/sys/netgraph/atm/ngatmbase.c,v 1.3 2005/01/07 01:45:40 imp Exp $
- * $DragonFly: src/sys/netgraph7/atm/ngatmbase.c,v 1.2 2008/06/26 23:05:37 dillon Exp $
- * $DragonFly: src/sys/netgraph7/atm/ngatmbase.c,v 1.2 2008/06/26 23:05:37 dillon Exp $
*/
#include <sys/param.h>
@@ -95,7 +93,7 @@ uni_msg_extend(struct uni_msg *m, size_t s)
lead = uni_msg_leading(m);
len = uni_msg_len(m);
s += lead + len + EXTRA;
- if ((b = kmalloc(s, M_UNIMSG, MB_DONTWAIT)) == NULL) {
+ if ((b = kmalloc(s, M_UNIMSG, M_NOWAIT)) == NULL) {
uni_msg_destroy(m);
return (ENOMEM);
}
@@ -4916,7 +4916,7 @@ sctp_sendall (struct sctp_inpcb *inp, struct uio *uio, struct mbuf *m, struct sc
{
int ret;
struct sctp_copy_all *ca;
- ca = kmalloc(sizeof(struct sctp_copy_all), M_PCB, MB_WAIT);
+ ca = kmalloc(sizeof(struct sctp_copy_all), M_PCB, M_NOWAIT);
if (ca == NULL) {
m_freem(m);
return (ENOMEM);
@@ -7505,7 +7505,7 @@ sctp_output(struct sctp_inpcb *inp, struct mbuf *m, struct sockaddr *addr,
asoc->strmout = NULL;
asoc->streamoutcnt = asoc->pre_open_streams;
asoc->strmout = kmalloc(asoc->streamoutcnt * sizeof(struct sctp_stream_out),
- M_PCB, MB_WAIT);
+ M_PCB, M_WAITOK);
for (i = 0; i < asoc->streamoutcnt; i++) {
/*
* inbound side must be set to 0xffff,
@@ -10287,7 +10287,7 @@ sctp_sosend(struct socket *so,
asoc->strmout =
kmalloc(asoc->streamoutcnt *
sizeof(struct sctp_stream_out),
- M_PCB, MB_WAIT);
+ M_PCB, M_WAITOK);
for (i = 0; i < asoc->streamoutcnt; i++) {
/*
* inbound side must be set to 0xffff,

0 comments on commit 5113665

Please sign in to comment.