svn commit: r226552 - head/sys/boot/zfs

Pawel Jakub Dawidek pjd at FreeBSD.org
Wed Oct 19 23:40:37 UTC 2011


Author: pjd
Date: Wed Oct 19 23:40:37 2011
New Revision: 226552
URL: http://svn.freebsd.org/changeset/base/226552

Log:
  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

Modified:
  head/sys/boot/zfs/zfsimpl.c

Modified: head/sys/boot/zfs/zfsimpl.c
==============================================================================
--- head/sys/boot/zfs/zfsimpl.c	Wed Oct 19 23:37:30 2011	(r226551)
+++ head/sys/boot/zfs/zfsimpl.c	Wed Oct 19 23:40:37 2011	(r226552)
@@ -988,7 +988,8 @@ zio_read_gang(spa_t *spa, const blkptr_t
 			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++) {


More information about the svn-src-all mailing list