grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/1] grub: fix hang in netboot


From: Ram Pai
Subject: Re: [PATCH 1/1] grub: fix hang in netboot
Date: Mon, 28 Apr 2014 12:34:29 -0700
User-agent: Mutt/1.5.20 (2009-12-10)

On Thu, Apr 24, 2014 at 03:07:33PM -0700, Ram Pai wrote:
> Grub can busy-loop and hang while network booting, if the network has
> some fair amount of activity. This is because grub's net module sniffs
> the network for packets, and busy-loops in receive_packets() till it
> finds network packet of type IP or IPV6.  During this period grub will
> not respond to any user input, thus hanging up the system.
>     
> The following patch lets grub to relax every few iterations, so that it
> can respond to other user inputs.
>     
> Signed-off-by: Ram Pai <address@hidden>
> 
> diff --git a/grub-core/net/net.c b/grub-core/net/net.c
> index 0e57e93..4b316fa 100644
> --- a/grub-2.02~beta2/grub-core/net/net.c
> +++ b/grub-2.02~beta2/grub-core/net/net.c
> @@ -1500,10 +1500,11 @@ grub_net_poll_cards_idle_real (void)
>    FOR_NET_CARDS (card)
>    {
>      grub_uint64_t ctime = grub_get_time_ms ();
> +    int stop_condition = 1;
> 
>      if (ctime < card->last_poll
>       || ctime >= card->last_poll + card->idle_poll_delay_ms)
> -      receive_packets (card, 0);
> +      receive_packets (card, &stop_condition);
>    }
>    grub_net_tcp_retransmit ();
>  }

There is a patch by Paulo that fixes the same
problem.  http://marc.info/?l=grub-devel&m=139175231351317&w=2
Git commit d99d2f84166b0f60673d5c0714605a153946c0fc.

This patch is not needed, please ignore.
RP




reply via email to

[Prev in Thread] Current Thread [Next in Thread]