17b94a
From 0c996d6c40c625f8a0ee6be2c220c89aaf70c840 Mon Sep 17 00:00:00 2001
17b94a
From: Mohit Agrawal <moagrawal@redhat.com>
17b94a
Date: Tue, 10 Dec 2019 08:35:23 +0530
17b94a
Subject: [PATCH 340/344] rpc: event_slot_alloc converted infinite loop after
17b94a
 reach slot_used to 1024
17b94a
17b94a
Problem: In the commit faf5ac13c4ee00a05e9451bf8da3be2a9043bbf2 missed one
17b94a
         condition to come out from the loop so after reach the slot_used to
17b94a
         1024 loop has become infinite loop
17b94a
17b94a
Solution: Correct the code path to avoid the infinite loop
17b94a
17b94a
> Change-Id: Ia02a109571f0d8cc9902c32db3e9b9282ee5c1db
17b94a
> Fixes: bz#1781440
17b94a
> Credits: Xavi Hernandez <xhernandez@redhat.com>
17b94a
> Signed-off-by: Mohit Agrawal <moagrawal@redhat.com>
17b94a
> (Cherry picked from commit 8030f9c0f092170ceb50cedf59b9c330022825b7)
17b94a
> (Reviewed on upstream link https://review.gluster.org/#/c/glusterfs/+/23843/)
17b94a
17b94a
Change-Id: Ia02a109571f0d8cc9902c32db3e9b9282ee5c1db
17b94a
BUG: 1781444
17b94a
Credits: Xavi Hernandez <xhernandez@redhat.com>
17b94a
Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
17b94a
Reviewed-on: https://code.engineering.redhat.com/gerrit/187460
17b94a
Tested-by: RHGS Build Bot <nigelb@redhat.com>
17b94a
Reviewed-by: Xavi Hernandez Juan <xhernandez@redhat.com>
17b94a
---
17b94a
 libglusterfs/src/event-epoll.c | 2 +-
17b94a
 1 file changed, 1 insertion(+), 1 deletion(-)
17b94a
17b94a
diff --git a/libglusterfs/src/event-epoll.c b/libglusterfs/src/event-epoll.c
17b94a
index 65f5efd..5afb2f2 100644
17b94a
--- a/libglusterfs/src/event-epoll.c
17b94a
+++ b/libglusterfs/src/event-epoll.c
17b94a
@@ -92,7 +92,7 @@ retry:
17b94a
     while (i < EVENT_EPOLL_TABLES) {
17b94a
         switch (event_pool->slots_used[i]) {
17b94a
             case EVENT_EPOLL_SLOTS:
17b94a
-                continue;
17b94a
+                break;
17b94a
             case 0:
17b94a
                 if (!event_pool->ereg[i]) {
17b94a
                     table = __event_newtable(event_pool, i);
17b94a
-- 
17b94a
1.8.3.1
17b94a