Reject setting health sensitivity greater than the maximum health
value.
Test-Parameters: trivial
Signed-off-by: Amir Shehata <ashehata@whamcloud.com>
Change-Id: I866ff2cac2ba6b034cdbac24096e7014c66a3e2e
Reviewed-on: https://review.whamcloud.com/33392
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Sonia Sharma <sharmaso@whamcloud.com>
Reviewed-by: Doug Oucharek <dougso@me.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
- if (value == *sensitivity) {
+ if (value > LNET_MAX_HEALTH_VALUE) {
mutex_unlock(&the_lnet.ln_api_mutex);
mutex_unlock(&the_lnet.ln_api_mutex);
+ CERROR("Invalid health value. Maximum: %d value = %lu\n",
+ LNET_MAX_HEALTH_VALUE, value);
+ return -EINVAL;