summaryrefslogtreecommitdiffstats
path: root/sys/netgraph
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2003-02-19 05:47:46 +0000
committerimp <imp@FreeBSD.org>2003-02-19 05:47:46 +0000
commitcf874b345d0f766fb64cf4737e1c85ccc78d2bee (patch)
tree9e20e320fe15ae4bf68f8335fcf9d3e71d3b3614 /sys/netgraph
parentb72619cecb8265d3efb3781b0acff1380762c173 (diff)
downloadFreeBSD-src-cf874b345d0f766fb64cf4737e1c85ccc78d2bee.zip
FreeBSD-src-cf874b345d0f766fb64cf4737e1c85ccc78d2bee.tar.gz
Back out M_* changes, per decision of the TRB.
Approved by: trb
Diffstat (limited to 'sys/netgraph')
-rw-r--r--sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_pccard.c4
-rw-r--r--sys/netgraph/bluetooth/drivers/h4/ng_h4.c4
-rw-r--r--sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c6
-rw-r--r--sys/netgraph/bluetooth/hci/ng_hci_cmds.c2
-rw-r--r--sys/netgraph/bluetooth/hci/ng_hci_evnt.c2
-rw-r--r--sys/netgraph/bluetooth/hci/ng_hci_misc.c2
-rw-r--r--sys/netgraph/bluetooth/hci/ng_hci_ulpi.c12
-rw-r--r--sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.h22
-rw-r--r--sys/netgraph/bluetooth/l2cap/ng_l2cap_evnt.c2
-rw-r--r--sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.c2
-rw-r--r--sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.c2
-rw-r--r--sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c16
-rw-r--r--sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c4
-rw-r--r--sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c16
-rw-r--r--sys/netgraph/ng_UI.c2
-rw-r--r--sys/netgraph/ng_bridge.c2
-rw-r--r--sys/netgraph/ng_cisco.c4
-rw-r--r--sys/netgraph/ng_eiface.c2
-rw-r--r--sys/netgraph/ng_frame_relay.c2
-rw-r--r--sys/netgraph/ng_gif.c2
-rw-r--r--sys/netgraph/ng_gif_demux.c2
-rw-r--r--sys/netgraph/ng_l2tp.c14
-rw-r--r--sys/netgraph/ng_lmi.c2
-rw-r--r--sys/netgraph/ng_one2many.c2
-rw-r--r--sys/netgraph/ng_ppp.c4
-rw-r--r--sys/netgraph/ng_pppoe.c18
-rw-r--r--sys/netgraph/ng_pptpgre.c4
-rw-r--r--sys/netgraph/ng_rfc1490.c4
-rw-r--r--sys/netgraph/ng_socket.c10
-rw-r--r--sys/netgraph/ng_source.c2
-rw-r--r--sys/netgraph/ng_tee.c2
-rw-r--r--sys/netgraph/ng_tty.c4
-rw-r--r--sys/netgraph/ng_vjc.c4
33 files changed, 91 insertions, 91 deletions
diff --git a/sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_pccard.c b/sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_pccard.c
index 2b008bf..443c18a 100644
--- a/sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_pccard.c
+++ b/sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_pccard.c
@@ -832,7 +832,7 @@ bt3c_receive(bt3c_softc_p sc)
sc->state = NG_BT3C_W4_PKT_IND;
sc->want = 1;
- MGETHDR(sc->m, M_NOWAIT, MT_DATA);
+ MGETHDR(sc->m, M_DONTWAIT, MT_DATA);
if (sc->m == NULL) {
NG_BT3C_ERR(sc->dev, "Could not get mbuf\n");
NG_BT3C_STAT_IERROR(sc->stat);
@@ -996,7 +996,7 @@ bt3c_append(struct mbuf *m0, int c)
}
if (m->m_len >= len) {
- MGET(m->m_next, M_NOWAIT, m0->m_type);
+ MGET(m->m_next, M_DONTWAIT, m0->m_type);
if (m->m_next == NULL)
return (ENOBUFS);
diff --git a/sys/netgraph/bluetooth/drivers/h4/ng_h4.c b/sys/netgraph/bluetooth/drivers/h4/ng_h4.c
index d793c04..650c6f4 100644
--- a/sys/netgraph/bluetooth/drivers/h4/ng_h4.c
+++ b/sys/netgraph/bluetooth/drivers/h4/ng_h4.c
@@ -170,7 +170,7 @@ ng_h4_open(dev_t dev, struct tty *tp)
}
/* Initialize private struct */
- MALLOC(sc, ng_h4_info_p, sizeof(*sc), M_NETGRAPH_H4, M_ZERO);
+ MALLOC(sc, ng_h4_info_p, sizeof(*sc), M_NETGRAPH_H4, M_WAITOK | M_ZERO);
if (sc == NULL) {
error = ENOMEM;
goto out;
@@ -516,7 +516,7 @@ ng_h4_input(int c, struct tty *tp)
if (sc->hook != NULL && NG_HOOK_IS_VALID(sc->hook)) {
struct mbuf *m = NULL;
- MGETHDR(m, M_NOWAIT, MT_DATA);
+ MGETHDR(m, M_DONTWAIT, MT_DATA);
if (m != NULL) {
m->m_pkthdr.len = 0;
diff --git a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c
index 71cb2df..603d722 100644
--- a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c
+++ b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c
@@ -1012,7 +1012,7 @@ ubt_intr_complete(usbd_xfer_handle h, usbd_private_handle p, usbd_status s)
/* Copy HCI event frame to mbuf */
- MGETHDR(m, M_NOWAIT, MT_DATA);
+ MGETHDR(m, M_DONTWAIT, MT_DATA);
if (m == NULL) {
NG_UBT_ALERT(
"%s: %s - Could not allocate mbuf\n", __func__, USBDEVNAME(sc->sc_dev));
@@ -1148,7 +1148,7 @@ ubt_bulk_in_complete(usbd_xfer_handle h, usbd_private_handle p, usbd_status s)
if (h->actlen < sizeof(*hdr))
goto done;
- MGETHDR(m, M_NOWAIT, MT_DATA);
+ MGETHDR(m, M_DONTWAIT, MT_DATA);
if (m == NULL) {
NG_UBT_ALERT(
"%s: %s - Could not allocate mbuf\n", __func__, USBDEVNAME(sc->sc_dev));
@@ -1426,7 +1426,7 @@ ubt_isoc_in_complete(usbd_xfer_handle h, usbd_private_handle p, usbd_status s)
/* Copy SCO data frame to mbuf */
- MGETHDR(m, M_NOWAIT, MT_DATA);
+ MGETHDR(m, M_DONTWAIT, MT_DATA);
if (m == NULL) {
NG_UBT_ALERT(
"%s: %s - Could not allocate mbuf\n",
diff --git a/sys/netgraph/bluetooth/hci/ng_hci_cmds.c b/sys/netgraph/bluetooth/hci/ng_hci_cmds.c
index 3e3e501..5769ee5 100644
--- a/sys/netgraph/bluetooth/hci/ng_hci_cmds.c
+++ b/sys/netgraph/bluetooth/hci/ng_hci_cmds.c
@@ -116,7 +116,7 @@ ng_hci_send_command(ng_hci_unit_p unit)
ng_hci_mtap(unit, m0);
- m = m_dup(m0, M_NOWAIT);
+ m = m_dup(m0, M_DONTWAIT);
if (m != NULL)
NG_SEND_DATA_ONLY(error, unit->drv, m);
else
diff --git a/sys/netgraph/bluetooth/hci/ng_hci_evnt.c b/sys/netgraph/bluetooth/hci/ng_hci_evnt.c
index cd199db..9d81380 100644
--- a/sys/netgraph/bluetooth/hci/ng_hci_evnt.c
+++ b/sys/netgraph/bluetooth/hci/ng_hci_evnt.c
@@ -504,7 +504,7 @@ con_compl(ng_hci_unit_p unit, struct mbuf *event)
} __attribute__ ((packed)) *lp;
struct mbuf *m;
- MGETHDR(m, M_NOWAIT, MT_DATA);
+ MGETHDR(m, M_DONTWAIT, MT_DATA);
if (m != NULL) {
m->m_pkthdr.len = m->m_len = sizeof(*lp);
lp = mtod(m, struct __link_policy *);
diff --git a/sys/netgraph/bluetooth/hci/ng_hci_misc.c b/sys/netgraph/bluetooth/hci/ng_hci_misc.c
index c4f1f85..ba92f89 100644
--- a/sys/netgraph/bluetooth/hci/ng_hci_misc.c
+++ b/sys/netgraph/bluetooth/hci/ng_hci_misc.c
@@ -67,7 +67,7 @@ ng_hci_mtap(ng_hci_unit_p unit, struct mbuf *m0)
int error = 0;
if (unit->raw != NULL && NG_HOOK_IS_VALID(unit->raw)) {
- m = m_dup(m0, M_NOWAIT);
+ m = m_dup(m0, M_DONTWAIT);
if (m != NULL)
NG_SEND_DATA_ONLY(error, unit->raw, m);
diff --git a/sys/netgraph/bluetooth/hci/ng_hci_ulpi.c b/sys/netgraph/bluetooth/hci/ng_hci_ulpi.c
index 0a2c48b..97a0ea8 100644
--- a/sys/netgraph/bluetooth/hci/ng_hci_ulpi.c
+++ b/sys/netgraph/bluetooth/hci/ng_hci_ulpi.c
@@ -232,7 +232,7 @@ ng_hci_lp_acl_con_req(ng_hci_unit_p unit, item_p item, hook_p hook)
* Create HCI command
*/
- MGETHDR(m, M_NOWAIT, MT_DATA);
+ MGETHDR(m, M_DONTWAIT, MT_DATA);
if (m == NULL) {
ng_hci_free_con(con);
error = ENOBUFS;
@@ -427,7 +427,7 @@ ng_hci_lp_sco_con_req(ng_hci_unit_p unit, item_p item, hook_p hook)
* Create HCI command
*/
- MGETHDR(m, M_NOWAIT, MT_DATA);
+ MGETHDR(m, M_DONTWAIT, MT_DATA);
if (m == NULL) {
ng_hci_free_con(sco_con);
error = ENOBUFS;
@@ -545,7 +545,7 @@ ng_hci_lp_discon_req(ng_hci_unit_p unit, item_p item, hook_p hook)
* Create HCI command
*/
- MGETHDR(m, M_NOWAIT, MT_DATA);
+ MGETHDR(m, M_DONTWAIT, MT_DATA);
if (m == NULL) {
error = ENOBUFS;
goto out;
@@ -794,7 +794,7 @@ ng_hci_lp_con_rsp(ng_hci_unit_p unit, item_p item, hook_p hook)
* Create HCI command
*/
- MGETHDR(m, M_NOWAIT, MT_DATA);
+ MGETHDR(m, M_DONTWAIT, MT_DATA);
if (m == NULL) {
error = ENOBUFS;
goto out;
@@ -1017,7 +1017,7 @@ ng_hci_lp_qos_req(ng_hci_unit_p unit, item_p item, hook_p hook)
* Create HCI command
*/
- MGETHDR(m, M_NOWAIT, MT_DATA);
+ MGETHDR(m, M_DONTWAIT, MT_DATA);
if (m == NULL) {
error = ENOBUFS;
goto out;
@@ -1247,7 +1247,7 @@ ng_hci_process_con_watchdog_timeout(node_p node, hook_p hook,
* Create HCI command
*/
- MGETHDR(m, M_NOWAIT, MT_DATA);
+ MGETHDR(m, M_DONTWAIT, MT_DATA);
if (m == NULL)
return; /* XXX this is bad */
diff --git a/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.h b/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.h
index 42f53aa..d107ad6 100644
--- a/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.h
+++ b/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.h
@@ -54,7 +54,7 @@ do { \
ng_l2cap_cmd_rej_data_t data; \
} __attribute__ ((packed)) *c = NULL; \
\
- MGETHDR((_m), M_NOWAIT, MT_DATA); \
+ MGETHDR((_m), M_DONTWAIT, MT_DATA); \
if ((_m) == NULL) \
break; \
\
@@ -88,7 +88,7 @@ do { \
ng_l2cap_con_req_cp param; \
} __attribute__ ((packed)) *c = NULL; \
\
- MGETHDR((_m), M_NOWAIT, MT_DATA); \
+ MGETHDR((_m), M_DONTWAIT, MT_DATA); \
if ((_m) == NULL) \
break; \
\
@@ -111,7 +111,7 @@ do { \
ng_l2cap_con_rsp_cp param; \
} __attribute__ ((packed)) *c = NULL; \
\
- MGETHDR((_m), M_NOWAIT, MT_DATA); \
+ MGETHDR((_m), M_DONTWAIT, MT_DATA); \
if ((_m) == NULL) \
break; \
\
@@ -136,7 +136,7 @@ do { \
ng_l2cap_cfg_req_cp param; \
} __attribute__ ((packed)) *c = NULL; \
\
- MGETHDR((_m), M_NOWAIT, MT_DATA); \
+ MGETHDR((_m), M_DONTWAIT, MT_DATA); \
if ((_m) == NULL) { \
NG_FREE_M((_data)); \
break; \
@@ -168,7 +168,7 @@ do { \
ng_l2cap_cfg_rsp_cp param; \
} __attribute__ ((packed)) *c = NULL; \
\
- MGETHDR((_m), M_NOWAIT, MT_DATA); \
+ MGETHDR((_m), M_DONTWAIT, MT_DATA); \
if ((_m) == NULL) { \
NG_FREE_M((_data)); \
break; \
@@ -198,7 +198,7 @@ do { \
do { \
u_int8_t *p = NULL; \
\
- MGETHDR((_m), M_NOWAIT, MT_DATA); \
+ MGETHDR((_m), M_DONTWAIT, MT_DATA); \
if ((_m) == NULL) \
break; \
\
@@ -275,7 +275,7 @@ do { \
ng_l2cap_discon_req_cp param; \
} __attribute__ ((packed)) *c = NULL; \
\
- MGETHDR((_m), M_NOWAIT, MT_DATA); \
+ MGETHDR((_m), M_DONTWAIT, MT_DATA); \
if ((_m) == NULL) \
break; \
\
@@ -298,7 +298,7 @@ do { \
ng_l2cap_discon_rsp_cp param; \
} __attribute__ ((packed)) *c = NULL; \
\
- MGETHDR((_m), M_NOWAIT, MT_DATA); \
+ MGETHDR((_m), M_DONTWAIT, MT_DATA); \
if ((_m) == NULL) \
break; \
\
@@ -318,7 +318,7 @@ do { \
do { \
ng_l2cap_cmd_hdr_t *c = NULL; \
\
- MGETHDR((_m), M_NOWAIT, MT_DATA); \
+ MGETHDR((_m), M_DONTWAIT, MT_DATA); \
if ((_m) == NULL) \
break; \
\
@@ -345,7 +345,7 @@ do { \
ng_l2cap_info_req_cp param; \
} __attribute__ ((packed)) *c = NULL; \
\
- MGETHDR((_m), M_NOWAIT, MT_DATA); \
+ MGETHDR((_m), M_DONTWAIT, MT_DATA); \
if ((_m) == NULL) \
break; \
\
@@ -368,7 +368,7 @@ do { \
ng_l2cap_info_rsp_data_t data; \
} __attribute__ ((packed)) *c = NULL; \
\
- MGETHDR((_m), M_NOWAIT, MT_DATA); \
+ MGETHDR((_m), M_DONTWAIT, MT_DATA); \
if ((_m) == NULL) \
break; \
\
diff --git a/sys/netgraph/bluetooth/l2cap/ng_l2cap_evnt.c b/sys/netgraph/bluetooth/l2cap/ng_l2cap_evnt.c
index e4a644d..3779b91 100644
--- a/sys/netgraph/bluetooth/l2cap/ng_l2cap_evnt.c
+++ b/sys/netgraph/bluetooth/l2cap/ng_l2cap_evnt.c
@@ -190,7 +190,7 @@ ng_l2cap_process_signal_cmd(ng_l2cap_con_p con)
/* Get the command, save the rest (if any) */
if (con->rx_pkt->m_pkthdr.len > hdr->length)
- m = m_split(con->rx_pkt, hdr->length, M_NOWAIT);
+ m = m_split(con->rx_pkt, hdr->length, M_DONTWAIT);
else
m = NULL;
diff --git a/sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.c b/sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.c
index 39979be..f505158 100644
--- a/sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.c
+++ b/sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.c
@@ -502,7 +502,7 @@ ng_l2cap_lp_send(ng_l2cap_con_p con, u_int16_t dcid, struct mbuf *m0)
/* Check length of the packet against HCI MTU */
len = m0->m_pkthdr.len;
if (len > l2cap->pkt_size) {
- m = m_split(m0, l2cap->pkt_size, M_NOWAIT);
+ m = m_split(m0, l2cap->pkt_size, M_DONTWAIT);
if (m == NULL) {
NG_L2CAP_ALERT(
"%s: %s - m_split(%d) failed\n", __func__, NG_NODE_NAME(l2cap->node),
diff --git a/sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.c b/sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.c
index affa98e..9fcbc6e 100644
--- a/sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.c
+++ b/sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.c
@@ -432,7 +432,7 @@ ng_l2cap_queue_command_timeout(void *context)
struct mbuf *
ng_l2cap_prepend(struct mbuf *m, int size)
{
- M_PREPEND(m, size, M_NOWAIT);
+ M_PREPEND(m, size, M_DONTWAIT);
if (m == NULL || (m->m_len < size && (m = m_pullup(m, size)) == NULL))
return (NULL);
diff --git a/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c b/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c
index 9bc2438..8fa8a08 100644
--- a/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c
+++ b/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c
@@ -275,7 +275,7 @@ ng_btsocket_hci_raw_node_rcvdata(hook_p hook, item_p item)
struct mbuf *nam = NULL;
int error;
- MGET(nam, M_NOWAIT, MT_SONAME);
+ MGET(nam, M_DONTWAIT, MT_SONAME);
if (nam != NULL) {
struct sockaddr_hci *sa = mtod(nam, struct sockaddr_hci *);
@@ -348,7 +348,7 @@ ng_btsocket_raw_send_ngmsg(char *path, int cmd, void *arg, int arglen)
struct ng_mesg *msg = NULL;
int error = 0;
- NG_MKMESSAGE(msg, NGM_HCI_COOKIE, cmd, arglen, 0);
+ NG_MKMESSAGE(msg, NGM_HCI_COOKIE, cmd, arglen, M_WAITOK);
if (msg == NULL)
return (ENOMEM);
@@ -374,7 +374,7 @@ ng_btsocket_raw_send_sync_ngmsg(ng_btsocket_hci_raw_pcb_p pcb, char *path,
ng_btsocket_hci_raw_get_token(&pcb->token);
pcb->msg = NULL;
- NG_MKMESSAGE(msg, NGM_HCI_COOKIE, cmd, 0, 0);
+ NG_MKMESSAGE(msg, NGM_HCI_COOKIE, cmd, 0, M_WAITOK);
if (msg == NULL) {
pcb->token = 0;
return (ENOMEM);
@@ -504,7 +504,7 @@ ng_btsocket_hci_raw_data_input(struct mbuf *nam)
* will check if socket has enough buffer space.
*/
- m = m_dup(m0, M_NOWAIT);
+ m = m_dup(m0, M_DONTWAIT);
if (m != NULL) {
struct mbuf *ctl = NULL;
@@ -743,7 +743,7 @@ ng_btsocket_hci_raw_attach(struct socket *so, int proto, struct thread *td)
return (error);
MALLOC(pcb, ng_btsocket_hci_raw_pcb_p, sizeof(*pcb),
- M_NETGRAPH_BTSOCKET_HCI_RAW, M_ZERO);
+ M_NETGRAPH_BTSOCKET_HCI_RAW, M_WAITOK | M_ZERO);
if (pcb == NULL)
return (ENOMEM);
@@ -956,7 +956,7 @@ ng_btsocket_hci_raw_control(struct socket *so, u_long cmd, caddr_t data,
pcb->msg = NULL;
NG_MKMESSAGE(msg, NGM_HCI_COOKIE,
- NGM_HCI_NODE_GET_NEIGHBOR_CACHE, 0, 0);
+ NGM_HCI_NODE_GET_NEIGHBOR_CACHE, 0, M_WAITOK);
if (msg == NULL) {
pcb->token = 0;
error = ENOMEM;
@@ -1014,7 +1014,7 @@ ng_btsocket_hci_raw_control(struct socket *so, u_long cmd, caddr_t data,
pcb->msg = NULL;
NG_MKMESSAGE(msg, NGM_HCI_COOKIE, NGM_HCI_NODE_GET_CON_LIST,
- 0, 0);
+ 0, M_WAITOK);
if (msg == NULL) {
pcb->token = 0;
error = ENOMEM;
@@ -1271,7 +1271,7 @@ ng_btsocket_hci_raw_send(struct socket *so, int flags, struct mbuf *m,
sa = (struct sockaddr *) &pcb->addr;
}
- MGET(nam, 0, MT_SONAME);
+ MGET(nam, M_TRYWAIT, MT_SONAME);
if (nam == NULL) {
error = ENOBUFS;
goto drop;
diff --git a/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c b/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c
index 8360038..dec7a3c 100644
--- a/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c
+++ b/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c
@@ -1464,7 +1464,7 @@ ng_btsocket_l2cap_data_input(struct mbuf *m, hook_p hook)
* it is a broadcast traffic after all
*/
- copy = m_dup(m, M_NOWAIT);
+ copy = m_dup(m, M_DONTWAIT);
if (copy != NULL) {
sbappendrecord(&pcb->so->so_rcv, copy);
sorwakeup(pcb->so);
@@ -2384,7 +2384,7 @@ ng_btsocket_l2cap_send2(ng_btsocket_l2cap_pcb_p pcb)
if (pcb->so->so_snd.sb_cc == 0)
return (EINVAL); /* XXX */
- m = m_dup(pcb->so->so_snd.sb_mb, M_NOWAIT);
+ m = m_dup(pcb->so->so_snd.sb_mb, M_DONTWAIT);
if (m == NULL)
return (ENOBUFS);
diff --git a/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c b/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c
index 44e3be1..3b24afd 100644
--- a/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c
+++ b/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c
@@ -571,7 +571,7 @@ ng_btsocket_l2cap_raw_attach(struct socket *so, int proto, struct thread *td)
/* Allocate the PCB */
MALLOC(pcb, ng_btsocket_l2cap_raw_pcb_p, sizeof(*pcb),
- M_NETGRAPH_BTSOCKET_L2CAP_RAW, M_ZERO);
+ M_NETGRAPH_BTSOCKET_L2CAP_RAW, M_WAITOK | M_ZERO);
if (pcb == NULL)
return (ENOMEM);
@@ -758,7 +758,7 @@ ng_btsocket_l2cap_raw_control(struct socket *so, u_long cmd, caddr_t data,
pcb->msg = NULL;
NG_MKMESSAGE(msg, NGM_L2CAP_COOKIE, NGM_L2CAP_NODE_GET_FLAGS,
- 0, 0);
+ 0, M_WAITOK);
if (msg == NULL) {
pcb->token = 0;
error = ENOMEM;
@@ -799,7 +799,7 @@ ng_btsocket_l2cap_raw_control(struct socket *so, u_long cmd, caddr_t data,
pcb->msg = NULL;
NG_MKMESSAGE(msg, NGM_L2CAP_COOKIE, NGM_L2CAP_NODE_GET_DEBUG,
- 0, 0);
+ 0, M_WAITOK);
if (msg == NULL) {
pcb->token = 0;
error = ENOMEM;
@@ -837,7 +837,7 @@ ng_btsocket_l2cap_raw_control(struct socket *so, u_long cmd, caddr_t data,
(struct ng_btsocket_l2cap_raw_node_debug *) data;
NG_MKMESSAGE(msg, NGM_L2CAP_COOKIE, NGM_L2CAP_NODE_SET_DEBUG,
- sizeof(ng_l2cap_node_debug_ep), 0);
+ sizeof(ng_l2cap_node_debug_ep), M_WAITOK);
if (msg == NULL) {
error = ENOMEM;
break;
@@ -865,7 +865,7 @@ ng_btsocket_l2cap_raw_control(struct socket *so, u_long cmd, caddr_t data,
pcb->msg = NULL;
NG_MKMESSAGE(msg, NGM_L2CAP_COOKIE, NGM_L2CAP_NODE_GET_CON_LIST,
- 0, 0);
+ 0, M_WAITOK);
if (msg == NULL) {
pcb->token = 0;
error = ENOMEM;
@@ -923,7 +923,7 @@ ng_btsocket_l2cap_raw_control(struct socket *so, u_long cmd, caddr_t data,
pcb->msg = NULL;
NG_MKMESSAGE(msg, NGM_L2CAP_COOKIE,
- NGM_L2CAP_NODE_GET_CHAN_LIST, 0, 0);
+ NGM_L2CAP_NODE_GET_CHAN_LIST, 0, M_WAITOK);
if (msg == NULL) {
pcb->token = 0;
error = ENOMEM;
@@ -987,7 +987,7 @@ ng_btsocket_l2cap_raw_control(struct socket *so, u_long cmd, caddr_t data,
NG_MKMESSAGE(msg, NGM_L2CAP_COOKIE,
NGM_L2CAP_L2CA_PING, sizeof(*ip) + p->echo_size,
- 0);
+ M_WAITOK);
if (msg == NULL) {
pcb->token = 0;
error = ENOMEM;
@@ -1056,7 +1056,7 @@ ng_btsocket_l2cap_raw_control(struct socket *so, u_long cmd, caddr_t data,
NG_MKMESSAGE(msg, NGM_L2CAP_COOKIE,
NGM_L2CAP_L2CA_GET_INFO, sizeof(*ip) + p->info_size,
- 0);
+ M_WAITOK);
if (msg == NULL) {
pcb->token = 0;
error = ENOMEM;
diff --git a/sys/netgraph/ng_UI.c b/sys/netgraph/ng_UI.c
index 8751105..e0733bc 100644
--- a/sys/netgraph/ng_UI.c
+++ b/sys/netgraph/ng_UI.c
@@ -194,7 +194,7 @@ ng_UI_rcvdata(hook_p hook, item_p item)
m_adj(m, ptr - start);
NG_FWD_NEW_DATA(error, item, priv->uplink, m); /* m -> NULL */
} else if (hook == priv->uplink) {
- M_PREPEND(m, 1, M_NOWAIT); /* Prepend IP NLPID */
+ M_PREPEND(m, 1, M_DONTWAIT); /* Prepend IP NLPID */
if (!m)
ERROUT(ENOBUFS);
mtod(m, u_char *)[0] = HDLC_UI;
diff --git a/sys/netgraph/ng_bridge.c b/sys/netgraph/ng_bridge.c
index 1e1ff1c..f552a50 100644
--- a/sys/netgraph/ng_bridge.c
+++ b/sys/netgraph/ng_bridge.c
@@ -713,7 +713,7 @@ ng_bridge_rcvdata(hook_p hook, item_p item)
* It's usable link but not the reserved (first) one.
* Copy mbuf and meta info for sending.
*/
- m2 = m_dup(m, M_NOWAIT); /* XXX m_copypacket() */
+ m2 = m_dup(m, M_DONTWAIT); /* XXX m_copypacket() */
if (m2 == NULL) {
link->stats.memoryFailures++;
NG_FREE_ITEM(item);
diff --git a/sys/netgraph/ng_cisco.c b/sys/netgraph/ng_cisco.c
index 70ef5d7..f263f35 100644
--- a/sys/netgraph/ng_cisco.c
+++ b/sys/netgraph/ng_cisco.c
@@ -360,7 +360,7 @@ cisco_rcvdata(hook_p hook, item_p item)
/* OK so it came from a protocol, heading out. Prepend general data
packet header. For now, IP,IPX only */
m = NGI_M(item); /* still associated with item */
- M_PREPEND(m, CISCO_HEADER_LEN, M_NOWAIT);
+ M_PREPEND(m, CISCO_HEADER_LEN, M_DONTWAIT);
if (!m) {
error = ENOBUFS;
goto out;
@@ -606,7 +606,7 @@ cisco_send(sc_p sc, int type, long par1, long par2)
getmicrotime(&time);
- MGETHDR(m, M_NOWAIT, MT_DATA);
+ MGETHDR(m, M_DONTWAIT, MT_DATA);
if (!m)
return (ENOBUFS);
diff --git a/sys/netgraph/ng_eiface.c b/sys/netgraph/ng_eiface.c
index 1bead1a..7588c92 100644
--- a/sys/netgraph/ng_eiface.c
+++ b/sys/netgraph/ng_eiface.c
@@ -417,7 +417,7 @@ ng_eiface_constructor(node_p node)
int error = 0;
/* Allocate node and interface private structures */
- MALLOC(priv, priv_p, sizeof(*priv), M_NETGRAPH, 0);
+ MALLOC(priv, priv_p, sizeof(*priv), M_NETGRAPH, M_WAITOK);
if (priv == NULL) {
return (ENOMEM);
}
diff --git a/sys/netgraph/ng_frame_relay.c b/sys/netgraph/ng_frame_relay.c
index e2dc299..dc55592 100644
--- a/sys/netgraph/ng_frame_relay.c
+++ b/sys/netgraph/ng_frame_relay.c
@@ -366,7 +366,7 @@ ngfrm_rcvdata(hook_p hook, item_p item)
alen = sc->addrlen;
if (alen == 0)
alen = 2; /* default value for transmit */
- M_PREPEND(m, alen, M_NOWAIT);
+ M_PREPEND(m, alen, M_DONTWAIT);
if (m == NULL) {
error = ENOBUFS;
goto bad;
diff --git a/sys/netgraph/ng_gif.c b/sys/netgraph/ng_gif.c
index 985cf31..2d99959 100644
--- a/sys/netgraph/ng_gif.c
+++ b/sys/netgraph/ng_gif.c
@@ -309,7 +309,7 @@ ng_gif_glue_af(struct mbuf **mp, int af)
* hopefully everything after that will not
* need one. So let's just use M_PREPEND.
*/
- M_PREPEND(m, sizeof (tmp_af), M_NOWAIT);
+ M_PREPEND(m, sizeof (tmp_af), M_DONTWAIT);
if (m == NULL) {
error = ENOBUFS;
goto done;
diff --git a/sys/netgraph/ng_gif_demux.c b/sys/netgraph/ng_gif_demux.c
index 9f6495a..066bea6 100644
--- a/sys/netgraph/ng_gif_demux.c
+++ b/sys/netgraph/ng_gif_demux.c
@@ -346,7 +346,7 @@ ng_gif_demux_rcvdata(hook_p hook, item_p item)
* Add address family header and set the output hook.
*/
iffam = get_iffam_from_hook(priv, hook);
- M_PREPEND(m, sizeof (iffam->family), M_NOWAIT);
+ M_PREPEND(m, sizeof (iffam->family), M_DONTWAIT);
if (m == NULL) {
NG_FREE_M(m);
NG_FREE_ITEM(item);
diff --git a/sys/netgraph/ng_l2tp.c b/sys/netgraph/ng_l2tp.c
index 69a7cf9..ebc6a41 100644
--- a/sys/netgraph/ng_l2tp.c
+++ b/sys/netgraph/ng_l2tp.c
@@ -851,7 +851,7 @@ ng_l2tp_recv_lower(node_p node, item_p item)
* later because of a memory error, because then the upper
* layer would never get the packet.
*/
- M_PREPEND(m, 2, M_NOWAIT);
+ M_PREPEND(m, 2, M_DONTWAIT);
if (m == NULL) {
priv->stats.memoryFailures++;
NG_FREE_ITEM(item);
@@ -955,7 +955,7 @@ ng_l2tp_recv_ctrl(node_p node, item_p item)
}
/* Copy packet */
- if ((m = L2TP_COPY_MBUF(seq->xwin[i], M_NOWAIT)) == NULL) {
+ if ((m = L2TP_COPY_MBUF(seq->xwin[i], M_DONTWAIT)) == NULL) {
priv->stats.memoryFailures++;
return (ENOBUFS);
}
@@ -991,7 +991,7 @@ ng_l2tp_recv_data(node_p node, item_p item, hookpriv_p hpriv)
M_PREPEND(m, 6
+ (2 * (hpriv->conf.include_length != 0))
+ (4 * (hpriv->conf.enable_dseq != 0)),
- M_NOWAIT);
+ M_DONTWAIT);
if (m == NULL) {
priv->stats.memoryFailures++;
NG_FREE_ITEM(item);
@@ -1219,7 +1219,7 @@ ng_l2tp_seq_recv_nr(priv_p priv, u_int16_t nr)
*/
while ((i = L2TP_SEQ_DIFF(seq->ns, seq->rack)) < seq->cwnd
&& seq->xwin[i] != NULL) {
- if ((m = L2TP_COPY_MBUF(seq->xwin[i], M_NOWAIT)) == NULL)
+ if ((m = L2TP_COPY_MBUF(seq->xwin[i], M_DONTWAIT)) == NULL)
priv->stats.memoryFailures++;
else
ng_l2tp_xmit_ctrl(priv, m, seq->ns);
@@ -1361,7 +1361,7 @@ ng_l2tp_seq_rack_timeout(void *arg)
seq->acks = 0;
/* Retransmit oldest unack'd packet */
- if ((m = L2TP_COPY_MBUF(seq->xwin[0], M_NOWAIT)) == NULL)
+ if ((m = L2TP_COPY_MBUF(seq->xwin[0], M_DONTWAIT)) == NULL)
priv->stats.memoryFailures++;
else
ng_l2tp_xmit_ctrl(priv, m, seq->rack);
@@ -1388,7 +1388,7 @@ ng_l2tp_xmit_ctrl(priv_p priv, struct mbuf *m, u_int16_t ns)
if (m == NULL) {
/* Create a new mbuf for ZLB packet */
- MGETHDR(m, M_NOWAIT, MT_DATA);
+ MGETHDR(m, M_DONTWAIT, MT_DATA);
if (m == NULL) {
priv->stats.memoryFailures++;
return (ENOBUFS);
@@ -1407,7 +1407,7 @@ ng_l2tp_xmit_ctrl(priv_p priv, struct mbuf *m, u_int16_t ns)
m_adj(m, 2);
/* Make room for L2TP header */
- M_PREPEND(m, 12, M_NOWAIT);
+ M_PREPEND(m, 12, M_DONTWAIT);
if (m == NULL) {
priv->stats.memoryFailures++;
return (ENOBUFS);
diff --git a/sys/netgraph/ng_lmi.c b/sys/netgraph/ng_lmi.c
index f098aa8..87f3567 100644
--- a/sys/netgraph/ng_lmi.c
+++ b/sys/netgraph/ng_lmi.c
@@ -321,7 +321,7 @@ nglmi_inquire(sc_p sc, int full)
if (sc->lmi_channel == NULL)
return;
- MGETHDR(m, M_NOWAIT, MT_DATA);
+ MGETHDR(m, M_DONTWAIT, MT_DATA);
if (m == NULL) {
log(LOG_ERR, "nglmi: unable to start up LMI processing\n");
return;
diff --git a/sys/netgraph/ng_one2many.c b/sys/netgraph/ng_one2many.c
index 5332049..927bb77 100644
--- a/sys/netgraph/ng_one2many.c
+++ b/sys/netgraph/ng_one2many.c
@@ -427,7 +427,7 @@ ng_one2many_rcvdata(hook_p hook, item_p item)
struct ng_one2many_link *mdst;
mdst = &priv->many[priv->activeMany[i]];
- m2 = m_dup(m, M_NOWAIT); /* XXX m_copypacket() */
+ m2 = m_dup(m, M_DONTWAIT); /* XXX m_copypacket() */
if (m2 == NULL) {
mdst->stats.memoryFailures++;
NG_FREE_ITEM(item);
diff --git a/sys/netgraph/ng_ppp.c b/sys/netgraph/ng_ppp.c
index 16373e3..6ffb082 100644
--- a/sys/netgraph/ng_ppp.c
+++ b/sys/netgraph/ng_ppp.c
@@ -1595,7 +1595,7 @@ deliver:
/* Split off next fragment as "m2" */
m2 = m;
if (!lastFragment) {
- struct mbuf *n = m_split(m, len, M_NOWAIT);
+ struct mbuf *n = m_split(m, len, M_DONTWAIT);
if (n == NULL) {
NG_FREE_M(m);
@@ -1916,7 +1916,7 @@ ng_ppp_addproto(struct mbuf *m, int proto, int compOK)
static struct mbuf *
ng_ppp_prepend(struct mbuf *m, const void *buf, int len)
{
- M_PREPEND(m, len, M_NOWAIT);
+ M_PREPEND(m, len, M_DONTWAIT);
if (m == NULL || (m->m_len < len && (m = m_pullup(m, len)) == NULL))
return (NULL);
bcopy(buf, mtod(m, u_char *), len);
diff --git a/sys/netgraph/ng_pppoe.c b/sys/netgraph/ng_pppoe.c
index 521d708..886747e 100644
--- a/sys/netgraph/ng_pppoe.c
+++ b/sys/netgraph/ng_pppoe.c
@@ -723,14 +723,14 @@ AAA
printf("pppoe: Session out of memory\n");
LEAVE(ENOMEM);
}
- MGETHDR(neg->m, M_NOWAIT, MT_DATA);
+ MGETHDR(neg->m, M_DONTWAIT, MT_DATA);
if(neg->m == NULL) {
printf("pppoe: Session out of mbufs\n");
FREE(neg, M_NETGRAPH_PPPOE);
LEAVE(ENOBUFS);
}
neg->m->m_pkthdr.rcvif = NULL;
- MCLGET(neg->m, M_NOWAIT);
+ MCLGET(neg->m, M_DONTWAIT);
if ((neg->m->m_flags & M_EXT) == 0) {
printf("pppoe: Session out of mcls\n");
m_freem(neg->m);
@@ -1008,7 +1008,7 @@ AAA
* Put it into a cluster.
*/
struct mbuf *n;
- n = m_dup(m, M_NOWAIT);
+ n = m_dup(m, M_DONTWAIT);
m_freem(m);
m = n;
if (m) {
@@ -1350,7 +1350,7 @@ AAA
* But first correct the length.
*/
sp->pkt_hdr.ph.length = htons((short)(m->m_pkthdr.len));
- M_PREPEND(m, sizeof(*wh), M_NOWAIT);
+ M_PREPEND(m, sizeof(*wh), M_DONTWAIT);
if (m == NULL) {
LEAVE(ENOBUFS);
}
@@ -1525,7 +1525,7 @@ AAA
wh->eh.ether_type = ETHERTYPE_PPPOE_DISC;
/* generate a packet of that type */
- MGETHDR(m, M_NOWAIT, MT_DATA);
+ MGETHDR(m, M_DONTWAIT, MT_DATA);
if(m == NULL)
printf("pppoe: Session out of mbufs\n");
else {
@@ -1596,7 +1596,7 @@ AAA
case PPPOE_SINIT:
case PPPOE_SREQ:
/* timeouts on these produce resends */
- m0 = m_copypacket(sp->neg->m, M_NOWAIT);
+ m0 = m_copypacket(sp->neg->m, M_DONTWAIT);
NG_SEND_DATA_ONLY( error, privp->ethernet_hook, m0);
neg->timeout_handle = timeout(pppoe_ticker,
hook, neg->timeout * hz);
@@ -1642,7 +1642,7 @@ AAA
case PPPOE_NEWCONNECTED:
/* send the PADS without a timeout - we're now connected */
- m0 = m_copypacket(sp->neg->m, M_NOWAIT);
+ m0 = m_copypacket(sp->neg->m, M_DONTWAIT);
NG_SEND_DATA_ONLY( error, privp->ethernet_hook, m0);
break;
@@ -1657,7 +1657,7 @@ AAA
* send the offer but if they don't respond
* in PPPOE_OFFER_TIMEOUT seconds, forget about it.
*/
- m0 = m_copypacket(sp->neg->m, M_NOWAIT);
+ m0 = m_copypacket(sp->neg->m, M_DONTWAIT);
NG_SEND_DATA_ONLY( error, privp->ethernet_hook, m0);
neg->timeout_handle = timeout(pppoe_ticker,
hook, PPPOE_OFFER_TIMEOUT * hz);
@@ -1665,7 +1665,7 @@ AAA
case PPPOE_SINIT:
case PPPOE_SREQ:
- m0 = m_copypacket(sp->neg->m, M_NOWAIT);
+ m0 = m_copypacket(sp->neg->m, M_DONTWAIT);
NG_SEND_DATA_ONLY( error, privp->ethernet_hook, m0);
neg->timeout_handle = timeout(pppoe_ticker, hook,
(hz * PPPOE_INITIAL_TIMEOUT));
diff --git a/sys/netgraph/ng_pptpgre.c b/sys/netgraph/ng_pptpgre.c
index 4422b29..50811da 100644
--- a/sys/netgraph/ng_pptpgre.c
+++ b/sys/netgraph/ng_pptpgre.c
@@ -522,7 +522,7 @@ ng_pptpgre_xmit(node_p node, item_p item)
/* Prepend GRE header to outgoing frame */
grelen = sizeof(*gre) + sizeof(u_int32_t) * (gre->hasSeq + gre->hasAck);
if (m == NULL) {
- MGETHDR(m, M_NOWAIT, MT_DATA);
+ MGETHDR(m, M_DONTWAIT, MT_DATA);
if (m == NULL) {
priv->stats.memoryFailures++;
if (item)
@@ -532,7 +532,7 @@ ng_pptpgre_xmit(node_p node, item_p item)
m->m_len = m->m_pkthdr.len = grelen;
m->m_pkthdr.rcvif = NULL;
} else {
- M_PREPEND(m, grelen, M_NOWAIT);
+ M_PREPEND(m, grelen, M_DONTWAIT);
if (m == NULL || (m->m_len < grelen
&& (m = m_pullup(m, grelen)) == NULL)) {
priv->stats.memoryFailures++;
diff --git a/sys/netgraph/ng_rfc1490.c b/sys/netgraph/ng_rfc1490.c
index b6c75ea..778d07b 100644
--- a/sys/netgraph/ng_rfc1490.c
+++ b/sys/netgraph/ng_rfc1490.c
@@ -278,14 +278,14 @@ ng_rfc1490_rcvdata(hook_p hook, item_p item)
break;
}
} else if (hook == priv->ppp) {
- M_PREPEND(m, 2, M_NOWAIT); /* Prepend PPP NLPID */
+ M_PREPEND(m, 2, M_DONTWAIT); /* Prepend PPP NLPID */
if (!m)
ERROUT(ENOBUFS);
mtod(m, u_char *)[0] = HDLC_UI;
mtod(m, u_char *)[1] = NLPID_PPP;
NG_FWD_NEW_DATA(error, item, priv->downlink, m);
} else if (hook == priv->inet) {
- M_PREPEND(m, 2, M_NOWAIT); /* Prepend IP NLPID */
+ M_PREPEND(m, 2, M_DONTWAIT); /* Prepend IP NLPID */
if (!m)
ERROUT(ENOBUFS);
mtod(m, u_char *)[0] = HDLC_UI;
diff --git a/sys/netgraph/ng_socket.c b/sys/netgraph/ng_socket.c
index f5a7643..f841a0e 100644
--- a/sys/netgraph/ng_socket.c
+++ b/sys/netgraph/ng_socket.c
@@ -224,7 +224,7 @@ ngc_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr,
/* Allocate an expendable buffer for the path, chop off
* the sockaddr header, and make sure it's NUL terminated */
len = sap->sg_len - 2;
- MALLOC(path, char *, len + 1, M_NETGRAPH_PATH, 0);
+ MALLOC(path, char *, len + 1, M_NETGRAPH_PATH, M_WAITOK);
if (path == NULL) {
error = ENOMEM;
goto release;
@@ -239,7 +239,7 @@ ngc_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr,
/* Move the data into a linear buffer as well. Messages are not
* delivered in mbufs. */
- MALLOC(msg, struct ng_mesg *, len + 1, M_NETGRAPH_MSG, 0);
+ MALLOC(msg, struct ng_mesg *, len + 1, M_NETGRAPH_MSG, M_WAITOK);
if (msg == NULL) {
error = ENOMEM;
goto release;
@@ -437,7 +437,7 @@ ng_setsockaddr(struct socket *so, struct sockaddr **addr)
if ( NG_NODE_HAS_NAME(pcbp->sockdata->node))
sg_len += namelen = strlen(NG_NODE_NAME(pcbp->sockdata->node));
- MALLOC(sg, struct sockaddr_ng *, sg_len, M_SONAME, M_ZERO);
+ MALLOC(sg, struct sockaddr_ng *, sg_len, M_SONAME, M_WAITOK | M_ZERO);
if (NG_NODE_HAS_NAME(pcbp->sockdata->node))
bcopy(NG_NODE_NAME(pcbp->sockdata->node), sg->sg_data, namelen);
@@ -470,7 +470,7 @@ ng_attach_cntl(struct socket *so)
/* Allocate node private info */
MALLOC(privdata, struct ngsock *,
- sizeof(*privdata), M_NETGRAPH_SOCK, M_ZERO);
+ sizeof(*privdata), M_NETGRAPH_SOCK, M_WAITOK | M_ZERO);
if (privdata == NULL) {
ng_detach_common(pcbp, NG_CONTROL);
return (ENOMEM);
@@ -513,7 +513,7 @@ ng_attach_common(struct socket *so, int type)
return (error);
/* Allocate the pcb */
- MALLOC(pcbp, struct ngpcb *, sizeof(*pcbp), M_PCB, M_ZERO);
+ MALLOC(pcbp, struct ngpcb *, sizeof(*pcbp), M_PCB, M_WAITOK | M_ZERO);
if (pcbp == NULL)
return (ENOMEM);
pcbp->type = type;
diff --git a/sys/netgraph/ng_source.c b/sys/netgraph/ng_source.c
index 8ad0a70..78525e8 100644
--- a/sys/netgraph/ng_source.c
+++ b/sys/netgraph/ng_source.c
@@ -640,7 +640,7 @@ ng_source_send (sc_p sc, int tosend, int *sent_p)
break;
/* duplicate the packet */
- m2 = m_copypacket(m, M_NOWAIT);
+ m2 = m_copypacket(m, M_DONTWAIT);
if (m2 == NULL) {
s = splnet();
IF_PREPEND(&sc->snd_queue, m);
diff --git a/sys/netgraph/ng_tee.c b/sys/netgraph/ng_tee.c
index 877ef16..fbe80ba 100644
--- a/sys/netgraph/ng_tee.c
+++ b/sys/netgraph/ng_tee.c
@@ -334,7 +334,7 @@ ngt_rcvdata(hook_p hook, item_p item)
meta_p meta2;
/* Copy packet (failure will not stop the original)*/
- m2 = m_dup(m, M_NOWAIT);
+ m2 = m_dup(m, M_DONTWAIT);
if (m2) {
/* Copy meta info */
diff --git a/sys/netgraph/ng_tty.c b/sys/netgraph/ng_tty.c
index a25ee9e..9a0175e 100644
--- a/sys/netgraph/ng_tty.c
+++ b/sys/netgraph/ng_tty.c
@@ -203,7 +203,7 @@ ngt_open(dev_t dev, struct tty *tp)
}
/* Initialize private struct */
- MALLOC(sc, sc_p, sizeof(*sc), M_NETGRAPH, M_ZERO);
+ MALLOC(sc, sc_p, sizeof(*sc), M_NETGRAPH, M_WAITOK | M_ZERO);
if (sc == NULL) {
error = ENOMEM;
goto done;
@@ -368,7 +368,7 @@ ngt_input(int c, struct tty *tp)
/* Get a new header mbuf if we need one */
if (!(m = sc->m)) {
- MGETHDR(m, M_NOWAIT, MT_DATA);
+ MGETHDR(m, M_DONTWAIT, MT_DATA);
if (!m) {
if (sc->flags & FLG_DEBUG)
log(LOG_ERR,
diff --git a/sys/netgraph/ng_vjc.c b/sys/netgraph/ng_vjc.c
index 14673ba..90d7d4d 100644
--- a/sys/netgraph/ng_vjc.c
+++ b/sys/netgraph/ng_vjc.c
@@ -476,7 +476,7 @@ ng_vjc_rcvdata(hook_p hook, item_p item)
m_adj(m, vjlen);
/* Copy the reconstructed TCP/IP headers into a new mbuf */
- MGETHDR(hm, M_NOWAIT, MT_DATA);
+ MGETHDR(hm, M_DONTWAIT, MT_DATA);
if (hm == NULL) {
priv->slc.sls_errorin++;
NG_FREE_M(m);
@@ -486,7 +486,7 @@ ng_vjc_rcvdata(hook_p hook, item_p item)
hm->m_len = 0;
hm->m_pkthdr.rcvif = NULL;
if (hlen > MHLEN) { /* unlikely, but can happen */
- MCLGET(hm, M_NOWAIT);
+ MCLGET(hm, M_DONTWAIT);
if ((hm->m_flags & M_EXT) == 0) {
m_freem(hm);
priv->slc.sls_errorin++;
OpenPOWER on IntegriCloud