From: Chris Horn Date: Thu, 20 Feb 2020 23:38:11 +0000 (-0600) Subject: LU-13276 lnet: Update nnis to avoid infinite loop X-Git-Tag: 2.13.53~116 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=d2631a28541ee0cdc8aef3bee8ebb329b048a42c;p=fs%2Flustre-release.git LU-13276 lnet: Update nnis to avoid infinite loop The goto loop in lnet_push_target_resize() is infinite because the loop variable 'nnis' is not updated with the new value from ln_push_target_nnis. Cray-bug-id: LUS-8526 Signed-off-by: Chris Horn Change-Id: I65b0bc0b56393f2296bafa3a964c59840baa0643 Reviewed-on: https://review.whamcloud.com/37676 Reviewed-by: Amir Shehata Tested-by: jenkins Tested-by: Maloo Reviewed-by: Shaun Tancheff Reviewed-by: Oleg Drokin --- diff --git a/lnet/lnet/api-ni.c b/lnet/lnet/api-ni.c index 9105eb1..f8310e4 100644 --- a/lnet/lnet/api-ni.c +++ b/lnet/lnet/api-ni.c @@ -1854,14 +1854,16 @@ int lnet_push_target_resize(void) struct lnet_handle_md old_mdh; struct lnet_ping_buffer *pbuf; struct lnet_ping_buffer *old_pbuf; - int nnis = the_lnet.ln_push_target_nnis; + int nnis; int rc; +again: + nnis = the_lnet.ln_push_target_nnis; if (nnis <= 0) { rc = -EINVAL; goto fail_return; } -again: + pbuf = lnet_ping_buffer_alloc(nnis, GFP_NOFS); if (!pbuf) { rc = -ENOMEM;