summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom_disk.c
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2008-10-21 18:52:38 +0000
committerkib <kib@FreeBSD.org>2008-10-21 18:52:38 +0000
commit38ebb614b6e0b12715acc5b46eb5c8711533c348 (patch)
tree611048dcf3218263eccb520b0e402159659647af /sys/geom/geom_disk.c
parent7813809388e1d606a9b4f1337ec4f061de2996fb (diff)
downloadFreeBSD-src-38ebb614b6e0b12715acc5b46eb5c8711533c348.zip
FreeBSD-src-38ebb614b6e0b12715acc5b46eb5c8711533c348.tar.gz
Do not overflow crashdumpmap.
Reported and tested by: pho Reviewed by: jhb MFC after: 1 week
Diffstat (limited to 'sys/geom/geom_disk.c')
-rw-r--r--sys/geom/geom_disk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/geom/geom_disk.c b/sys/geom/geom_disk.c
index 20998bd..a931dcf 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 = dp->d_maxsize;
+ di.maxiosize = min(dp->d_maxsize, MAXDUMPPGS * PAGE_SIZE);
di.mediaoffset = gkd->offset;
if ((gkd->offset + gkd->length) > dp->d_mediasize)
gkd->length = dp->d_mediasize - gkd->offset;
OpenPOWER on IntegriCloud