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.
This commit is contained in:
parent
049f63824c
commit
d99d2f8416
2 changed files with 13 additions and 1 deletions
12
ChangeLog
12
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>
|
2014-01-19 Colin Watson <cjwatson@ubuntu.com>
|
||||||
|
|
||||||
* grub-core/osdep/freebsd/hostdisk.c (grub_util_fd_open): Ignore
|
* grub-core/osdep/freebsd/hostdisk.c (grub_util_fd_open): Ignore
|
||||||
|
|
|
@ -1453,7 +1453,7 @@ receive_packets (struct grub_net_card *card, int *stop_condition)
|
||||||
}
|
}
|
||||||
card->opened = 1;
|
card->opened = 1;
|
||||||
}
|
}
|
||||||
while (1)
|
while (received < 100)
|
||||||
{
|
{
|
||||||
/* Maybe should be better have a fixed number of packets for each card
|
/* Maybe should be better have a fixed number of packets for each card
|
||||||
and just mark them as used and not used. */
|
and just mark them as used and not used. */
|
||||||
|
|
Loading…
Reference in a new issue