Blame SOURCES/0001-change-stop-condition-to-avoid-infinite-loops.patch

606ea6
From d99d2f84166b0f60673d5c0714605a153946c0fc Mon Sep 17 00:00:00 2001
606ea6
From: Paulo Flabiano Smorigo <pfsmorigo@br.ibm.com>
606ea6
Date: Tue, 21 Jan 2014 10:49:39 -0200
606ea6
Subject: [PATCH] change stop condition to avoid infinite loops
606ea6
606ea6
In net/net.c there is a while (1) that only exits if there is a stop
606ea6
condition and more then 10 packages or if there is no package received.
606ea6
606ea6
If GRUB is idle and enter in this loop, the only condition to leave is
606ea6
if it doesn't have incoming packages. In a network with heavy traffic
606ea6
this never happens.
606ea6
---
606ea6
 ChangeLog           | 12 ++++++++++++
606ea6
 grub-core/net/net.c |  2 +-
606ea6
 2 files changed, 13 insertions(+), 1 deletion(-)
606ea6
606ea6
diff --git a/grub-core/net/net.c b/grub-core/net/net.c
606ea6
index 0e57e93..56355f3 100644
606ea6
--- a/grub-core/net/net.c
606ea6
+++ b/grub-core/net/net.c
606ea6
@@ -1453,7 +1453,7 @@ receive_packets (struct grub_net_card *card, int *stop_condition)
606ea6
 	}
606ea6
       card->opened = 1;
606ea6
     }
606ea6
-  while (1)
606ea6
+  while (received < 100)
606ea6
     {
606ea6
       /* Maybe should be better have a fixed number of packets for each card
606ea6
 	 and just mark them as used and not used.  */ 
606ea6
-- 
606ea6
1.8.5.3
606ea6