Author: cem
Date: Sat Oct 20 22:24:58 2018
New Revision: 339501
URL: https://svnweb.freebsd.org/changeset/base/339501

Log:
  netdump: Zone mbufs should be allocated before dump
  
  Reviewed by:  markj
  Sponsored by: Dell EMC Isilon
  Differential Revision:        https://reviews.freebsd.org/D17306

Modified:
  head/sys/kern/kern_mbuf.c

Modified: head/sys/kern/kern_mbuf.c
==============================================================================
--- head/sys/kern/kern_mbuf.c   Sat Oct 20 22:17:16 2018        (r339500)
+++ head/sys/kern/kern_mbuf.c   Sat Oct 20 22:24:58 2018        (r339501)
@@ -33,8 +33,8 @@ __FBSDID("$FreeBSD$");
 #include "opt_param.h"
 
 #include <sys/param.h>
+#include <sys/conf.h>
 #include <sys/malloc.h>
-#include <sys/types.h>
 #include <sys/systm.h>
 #include <sys/mbuf.h>
 #include <sys/domain.h>
@@ -409,6 +409,8 @@ nd_buf_import(void *arg, void **store, int count, int 
        struct mbuf *m;
        int i;
 
+       KASSERT(!dumping, ("%s: ran out of pre-allocated mbufs", __func__));
+
        q = arg;
 
        for (i = 0; i < count; i++) {
@@ -443,6 +445,8 @@ nd_pack_import(void *arg __unused, void **store, int c
        struct mbuf *m;
        void *clust;
        int i;
+
+       KASSERT(!dumping, ("%s: ran out of pre-allocated mbufs", __func__));
 
        for (i = 0; i < count; i++) {
                m = m_get(MT_DATA, M_NOWAIT);
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to