From 11589318f3bb4cd561af4cb65f92b07244ef01c4 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Fri, 18 Apr 2003 12:37:33 +0000 Subject: KASSERT that NG_MKMESSAGE() is not called with mbuf flags. --- sys/netgraph/ng_message.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/netgraph/ng_message.h b/sys/netgraph/ng_message.h index e8fd8325f931..ea6b35f3e72b 100644 --- a/sys/netgraph/ng_message.h +++ b/sys/netgraph/ng_message.h @@ -361,6 +361,10 @@ struct flow_manager { */ #define NG_MKMESSAGE(msg, cookie, cmdid, len, how) \ do { \ + KASSERT(!(how & M_DONTWAIT), \ + ("NG_MKMESSAGE() with how=M_DONTWAIT (%d)\n", how)); \ + KASSERT(!(how & M_TRYWAIT), \ + ("NG_MKMESSAGE() with how=M_TRYWAIT (%d)\n", how)); \ MALLOC((msg), struct ng_mesg *, sizeof(struct ng_mesg) \ + (len), M_NETGRAPH_MSG, (how) | M_ZERO); \ if ((msg) == NULL) \ -- cgit v1.2.3