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