From 9e5255af26233e7ef051ebdd8bdccbd15d0d9256 Mon Sep 17 00:00:00 2001 From: Dave Anderson Date: Wed, 11 Oct 2017 16:11:34 -0400 Subject: [PATCH] Fix to prevent a useless message during session inialization. Without the patch, if the highest possible node bit in the node_states[N_ONLINE] multi-word bitmask is set, then a message such as "crash: next_online_node: 256 is too large!" will be displayed. (anderson@redhat.com) --- memory.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/memory.c b/memory.c index 8efe0b2..9c9a40d 100644 --- a/memory.c +++ b/memory.c @@ -17200,10 +17200,8 @@ next_online_node(int first) int i, j, node; ulong mask, *maskptr; - if ((first/BITS_PER_LONG) >= vt->node_online_map_len) { - error(INFO, "next_online_node: %d is too large!\n", first); + if ((first/BITS_PER_LONG) >= vt->node_online_map_len) return -1; - } maskptr = (ulong *)vt->node_online_map; for (i = node = 0; i < vt->node_online_map_len; i++, maskptr++) {