From d2631a28541ee0cdc8aef3bee8ebb329b048a42c Mon Sep 17 00:00:00 2001 From: Chris Horn Date: Thu, 20 Feb 2020 17:38:11 -0600 Subject: [PATCH 1/1] 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 --- lnet/lnet/api-ni.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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; -- 1.8.3.1