Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Oct 2018 22:24:58 +0000 (UTC)
From:      Conrad Meyer <cem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r339501 - head/sys/kern
Message-ID:  <201810202224.w9KMOwpv067164@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810202224.w9KMOwpv067164>