diff options
author | pjd <pjd@FreeBSD.org> | 2011-10-19 23:40:37 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2011-10-19 23:40:37 +0000 |
commit | 5418d81b3820c4a900f2188badcafc9868750457 (patch) | |
tree | 678cfff863e06cb718fbb3022e25d9522d0ef4da /sys/boot/zfs | |
parent | dca375324ce41ff5bc7fb41e30690e8b7b26a39f (diff) | |
download | FreeBSD-src-5418d81b3820c4a900f2188badcafc9868750457.zip FreeBSD-src-5418d81b3820c4a900f2188badcafc9868750457.tar.gz |
Never pass NULL block pointer when reading. This is neither expected nor
handled by lower layers like vdev_raidz, which uses bp for checksum
verification. This bug could lead to NULL pointer reference and resets
during boot.
MFC after: 3 days
Diffstat (limited to 'sys/boot/zfs')
-rw-r--r-- | sys/boot/zfs/zfsimpl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/boot/zfs/zfsimpl.c b/sys/boot/zfs/zfsimpl.c index 3052db6..b8d1606 100644 --- a/sys/boot/zfs/zfsimpl.c +++ b/sys/boot/zfs/zfsimpl.c @@ -988,7 +988,8 @@ zio_read_gang(spa_t *spa, const blkptr_t *bp, const dva_t *dva, void *buf) break; if (!vdev || !vdev->v_read) return (EIO); - if (vdev->v_read(vdev, NULL, &zio_gb, offset, SPA_GANGBLOCKSIZE)) + + if (vdev->v_read(vdev, bp, &zio_gb, offset, SPA_GANGBLOCKSIZE)) return (EIO); for (i = 0; i < SPA_GBH_NBLKPTRS; i++) { |