aboutsummaryrefslogtreecommitdiff
path: root/stand/libsa
diff options
context:
space:
mode:
authorToomas Soome <tsoome@FreeBSD.org>2019-05-29 07:24:10 +0000
committerToomas Soome <tsoome@FreeBSD.org>2019-05-29 07:24:10 +0000
commit51e5c6b89ebfb5615e7bbb6e8b5d29991dd92250 (patch)
treed64f3b7d5dd90ad7a6efd9a98d557a4b5b55130d /stand/libsa
parentbec2d7e9a286525cd2349cb11e35010021681045 (diff)
downloadsrc-51e5c6b89ebfb5615e7bbb6e8b5d29991dd92250.tar.gz
src-51e5c6b89ebfb5615e7bbb6e8b5d29991dd92250.zip
loader: zfs_alloc and zfs_free should use panic
The zfs alloc and free code print out the error and get stuck in infinite loop; use panic() instead.
Notes
Notes: svn path=/head/; revision=348352
Diffstat (limited to 'stand/libsa')
-rw-r--r--stand/libsa/zfs/zfsimpl.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/stand/libsa/zfs/zfsimpl.c b/stand/libsa/zfs/zfsimpl.c
index 136f7c11eea1..62e1d45a6606 100644
--- a/stand/libsa/zfs/zfsimpl.c
+++ b/stand/libsa/zfs/zfsimpl.c
@@ -107,8 +107,7 @@ zfs_alloc(size_t size)
char *ptr;
if (zfs_temp_ptr + size > zfs_temp_end) {
- printf("ZFS: out of temporary buffer space\n");
- for (;;) ;
+ panic("ZFS: out of temporary buffer space");
}
ptr = zfs_temp_ptr;
zfs_temp_ptr += size;
@@ -122,8 +121,7 @@ zfs_free(void *ptr, size_t size)
zfs_temp_ptr -= size;
if (zfs_temp_ptr != ptr) {
- printf("ZFS: zfs_alloc()/zfs_free() mismatch\n");
- for (;;) ;
+ panic("ZFS: zfs_alloc()/zfs_free() mismatch");
}
}