Skip to content

Commit 0fd1d0d

Browse files
robnbehlendorf
authored andcommitted
tunables: don't assert initialisation in impl getters
It actually doesn't matter if it's not initialised when we first query the current value; it just returns empty-string. A crash is quite obnoxious even if it is a rare case. Sponsored-by: https://despairlabs.com/sponsor/ Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Alexander Motin <[email protected]> Reviewed-by: Pavel Snajdr <[email protected]> Signed-off-by: Rob Norris <[email protected]> Closes #17377
1 parent 2e394cb commit 0fd1d0d

File tree

3 files changed

+0
-6
lines changed

3 files changed

+0
-6
lines changed

module/icp/algs/aes/aes_impl.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,8 +420,6 @@ icp_aes_impl_get(char *buffer, zfs_kernel_param_t *kp)
420420
char *fmt;
421421
const uint32_t impl = AES_IMPL_READ(icp_aes_impl);
422422

423-
ASSERT(aes_impl_initialized);
424-
425423
/* list mandatory options */
426424
for (i = 0; i < ARRAY_SIZE(aes_impl_opts); i++) {
427425
fmt = (impl == aes_impl_opts[i].sel) ? "[%s] " : "%s ";

module/icp/algs/modes/gcm.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -948,8 +948,6 @@ icp_gcm_impl_get(char *buffer, zfs_kernel_param_t *kp)
948948
char *fmt;
949949
const uint32_t impl = GCM_IMPL_READ(icp_gcm_impl);
950950

951-
ASSERT(gcm_impl_initialized);
952-
953951
/* list mandatory options */
954952
for (i = 0; i < ARRAY_SIZE(gcm_impl_opts); i++) {
955953
#ifdef CAN_USE_GCM_ASM

module/zfs/vdev_raidz_math.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -643,8 +643,6 @@ vdev_raidz_impl_get(char *buffer, size_t size)
643643
char *fmt;
644644
const uint32_t impl = RAIDZ_IMPL_READ(zfs_vdev_raidz_impl);
645645

646-
ASSERT(raidz_math_initialized);
647-
648646
/* list mandatory options */
649647
for (i = 0; i < ARRAY_SIZE(math_impl_opts) - 2; i++) {
650648
fmt = (impl == math_impl_opts[i].sel) ? "[%s] " : "%s ";

0 commit comments

Comments
 (0)