diff --git a/net/lnet/lnet/api-ni.c b/net/lnet/lnet/api-ni.c index 21e0175..a2c648e 100644 --- a/net/lnet/lnet/api-ni.c +++ b/net/lnet/lnet/api-ni.c @@ -175,9 +175,11 @@ static int lnet_discover(struct lnet_process_id id, u32 force, 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;