⬢ DragonFlyBSD Kernel Audit
DF-2727 / fix.diff
← back to finding ↓ download raw
--- a/sys/kern/vfs_cluster.c
+++ b/sys/kern/vfs_cluster.c
@@ -1127,7 +1127,11 @@
 	if (bp->b_flags & B_ERROR) {
 		error = bp->b_error;
 	} else if (bp->b_bcount != bp->b_bufsize) {
-		panic("cluster_callback: unexpected EOF on cluster %p!", bio);
+		/*
+		 * Short/residual cluster I/O: propagate an error to all
+		 * components instead of taking the system down.
+		 */
+		error = EIO;
 	}
 
 	pmap_qremove_noinval(trunc_page((vm_offset_t) bp->b_data),