summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/amd64/amd64/dump_machdep.c2
-rw-r--r--sys/amd64/amd64/minidump_machdep.c2
-rw-r--r--sys/geom/geom_disk.c2
-rw-r--r--sys/i386/i386/dump_machdep.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/sys/amd64/amd64/dump_machdep.c b/sys/amd64/amd64/dump_machdep.c
index c07f0ca..34a4ecc7 100644
--- a/sys/amd64/amd64/dump_machdep.c
+++ b/sys/amd64/amd64/dump_machdep.c
@@ -165,7 +165,7 @@ cb_dumpdata(struct md_pa *mdp, int seqnr, void *arg)
va = 0;
pgs = mdp->md_size / PAGE_SIZE;
pa = mdp->md_start;
- maxdumppgs = di->maxiosize / PAGE_SIZE;
+ maxdumppgs = min(di->maxiosize / PAGE_SIZE, MAXDUMPPGS);
if (maxdumppgs == 0) /* seatbelt */
maxdumppgs = 1;
diff --git a/sys/amd64/amd64/minidump_machdep.c b/sys/amd64/amd64/minidump_machdep.c
index ec6727c..676d013 100644
--- a/sys/amd64/amd64/minidump_machdep.c
+++ b/sys/amd64/amd64/minidump_machdep.c
@@ -104,7 +104,7 @@ blk_write(struct dumperinfo *di, char *ptr, vm_paddr_t pa, size_t sz)
int error, i, c;
u_int maxdumpsz;
- maxdumpsz = di->maxiosize;
+ maxdumpsz = min(di->maxiosize, MAXDUMPPGS * PAGE_SIZE);
if (maxdumpsz == 0) /* seatbelt */
maxdumpsz = PAGE_SIZE;
error = 0;
diff --git a/sys/geom/geom_disk.c b/sys/geom/geom_disk.c
index a931dcf..20998bd 100644
--- a/sys/geom/geom_disk.c
+++ b/sys/geom/geom_disk.c
@@ -179,7 +179,7 @@ g_disk_kerneldump(struct bio *bp, struct disk *dp)
di.dumper = dp->d_dump;
di.priv = dp;
di.blocksize = dp->d_sectorsize;
- di.maxiosize = min(dp->d_maxsize, MAXDUMPPGS * PAGE_SIZE);
+ di.maxiosize = dp->d_maxsize;
di.mediaoffset = gkd->offset;
if ((gkd->offset + gkd->length) > dp->d_mediasize)
gkd->length = dp->d_mediasize - gkd->offset;
diff --git a/sys/i386/i386/dump_machdep.c b/sys/i386/i386/dump_machdep.c
index 4522dc3..a1444f0 100644
--- a/sys/i386/i386/dump_machdep.c
+++ b/sys/i386/i386/dump_machdep.c
@@ -165,7 +165,7 @@ cb_dumpdata(struct md_pa *mdp, int seqnr, void *arg)
va = 0;
pgs = mdp->md_size / PAGE_SIZE;
pa = mdp->md_start;
- maxdumppgs = di->maxiosize / PAGE_SIZE;
+ maxdumppgs = min(di->maxiosize / PAGE_SIZE, MAXDUMPPGS);
if (maxdumppgs == 0) /* seatbelt */
maxdumppgs = 1;
OpenPOWER on IntegriCloud