aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Noland <rnoland@FreeBSD.org>2009-11-14 18:42:09 +0000
committerRobert Noland <rnoland@FreeBSD.org>2009-11-14 18:42:09 +0000
commitcb752cfcac9e53cac9546b8711894bb7ae2d27b7 (patch)
treedf2a4030c1e0238cc59f5877e1c2644e3d0d12a0
parent9bcf40edac644d7caa9721e7e7aa683ef810dcd3 (diff)
downloadsrc-cb752cfcac9e53cac9546b8711894bb7ae2d27b7.tar.gz
src-cb752cfcac9e53cac9546b8711894bb7ae2d27b7.zip
MFC r199241
This patch addresses an overflow in the the zfs boot code and allows users to boot from zfs raidz volumes. This has been tested by a number of users and does not impact those which are not booting from zfs raidz volumes. Submitted by: Matt Reimer <mattjreimer@gmail.com> Approved by: re (kib)
Notes
Notes: svn path=/releng/8.0/; revision=199275
-rw-r--r--sys/cddl/boot/zfs/zfssubr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/cddl/boot/zfs/zfssubr.c b/sys/cddl/boot/zfs/zfssubr.c
index fb4444f242eb..4013986c18c3 100644
--- a/sys/cddl/boot/zfs/zfssubr.c
+++ b/sys/cddl/boot/zfs/zfssubr.c
@@ -550,7 +550,8 @@ vdev_raidz_read(vdev_t *vdev, const blkptr_t *bp, void *buf,
uint64_t s = psize >> unit_shift;
uint64_t f = b % dcols;
uint64_t o = (b / dcols) << unit_shift;
- int q, r, c, c1, bc, col, acols, coff, devidx, asize, n;
+ uint64_t q, r, coff;
+ int c, c1, bc, col, acols, devidx, asize, n;
static raidz_col_t cols[16];
raidz_col_t *rc, *rc1;