netdump: Zone mbufs should be allocated before dump

Reviewed by:	markj
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D17306
This commit is contained in:
Conrad Meyer 2018-10-20 22:24:58 +00:00
parent 987733eddf
commit 3937ee7557
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=339501

View File

@ -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 domain __unused,
struct mbuf *m;
int i;
KASSERT(!dumping, ("%s: ran out of pre-allocated mbufs", __func__));
q = arg;
for (i = 0; i < count; i++) {
@ -444,6 +446,8 @@ nd_pack_import(void *arg __unused, void **store, int count, int domain __unused,
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);
if (m == NULL)