Whamcloud - gitweb
LU-11530 lnet: properly error check sensitivity
[fs/lustre-release.git] / lnet / lnet / api-ni.c
index b2d4c25..d796e9c 100644 (file)
@@ -217,9 +217,11 @@ sensitivity_set(const char *val, cfs_kernel_param_arg_t *kp)
                return 0;
        }
 
-       if (value == *sensitivity) {
+       if (value > LNET_MAX_HEALTH_VALUE) {
                mutex_unlock(&the_lnet.ln_api_mutex);
-               return 0;
+               CERROR("Invalid health value. Maximum: %d value = %lu\n",
+                      LNET_MAX_HEALTH_VALUE, value);
+               return -EINVAL;
        }
 
        *sensitivity = value;