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