mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Revert r184136. Instead, push the check for crashdumpmap overflow into the
MD i386 and amd64 dump code. Requested by: jhb Retested by: pho MFC after: 3 days (+ 176304 + 184136)
This commit is contained in:
parent
7a9c4d2409
commit
f5dfdb519f
4 changed files with 4 additions and 4 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue