diff options
author | kib <kib@FreeBSD.org> | 2008-10-21 18:52:38 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2008-10-21 18:52:38 +0000 |
commit | 38ebb614b6e0b12715acc5b46eb5c8711533c348 (patch) | |
tree | 611048dcf3218263eccb520b0e402159659647af /sys/geom/geom_disk.c | |
parent | 7813809388e1d606a9b4f1337ec4f061de2996fb (diff) | |
download | FreeBSD-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.c | 2 |
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; |