summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMohit Agrawal <moagrawal@redhat.com>2019-12-10 08:35:23 +0530
committerXavi Hernandez <xhernandez@redhat.com>2019-12-10 07:47:09 +0000
commit8030f9c0f092170ceb50cedf59b9c330022825b7 (patch)
treef0f747b097ebf397d1e89f83a97565b2b26d16d7
parentf8f4efef77c177900923f5b29ddb707fb3f07720 (diff)
downloadglusterfs-8030f9c0f092170ceb50cedf59b9c330022825b7.tar.gz
glusterfs-8030f9c0f092170ceb50cedf59b9c330022825b7.tar.xz
glusterfs-8030f9c0f092170ceb50cedf59b9c330022825b7.zip
rpc: event_slot_alloc converted infinite loop after reach slot_used to 1024
Problem: In the commit faf5ac13c4ee00a05e9451bf8da3be2a9043bbf2 missed one condition to come out from the loop so after reach the slot_used to 1024 loop has become infinite loop Solution: Correct the code path to avoid the infinite loop Change-Id: Ia02a109571f0d8cc9902c32db3e9b9282ee5c1db Fixes: bz#1781440 Credits: Xavi Hernandez <xhernandez@redhat.com> Signed-off-by: Mohit Agrawal <moagrawal@redhat.com>
-rw-r--r--libglusterfs/src/event-epoll.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libglusterfs/src/event-epoll.c b/libglusterfs/src/event-epoll.c
index 944715a084..bfe2648a92 100644
--- a/libglusterfs/src/event-epoll.c
+++ b/libglusterfs/src/event-epoll.c
@@ -86,7 +86,7 @@ retry:
while (i < EVENT_EPOLL_TABLES) {
switch (event_pool->slots_used[i]) {
case EVENT_EPOLL_SLOTS:
- continue;
+ break;
case 0:
if (!event_pool->ereg[i]) {
table = __event_newtable(event_pool, i);