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