From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1W5WUj-0000KW-Ex for mharc-grub-devel@gnu.org; Tue, 21 Jan 2014 03:15:37 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35699) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5WUX-00009f-EG for grub-devel@gnu.org; Tue, 21 Jan 2014 03:15:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W5WUM-0006yi-MZ for grub-devel@gnu.org; Tue, 21 Jan 2014 03:15:25 -0500 Received: from mail-ee0-x22c.google.com ([2a00:1450:4013:c00::22c]:63126) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5WUM-0006yS-Eu for grub-devel@gnu.org; Tue, 21 Jan 2014 03:15:14 -0500 Received: by mail-ee0-f44.google.com with SMTP id c13so3854770eek.31 for ; Tue, 21 Jan 2014 00:15:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type; bh=29go7wyxzEdBtRK+9rKz0XD/l/rCLORsfRoAOiK74cY=; b=BCqVeXCTHU+DpdLNZbp5fZoY55xjFwGuFtEvZZqTc5PJEuoQt6dayCFLHQlPhZFa8T Q4jjpaaf4FM1Y+B/0sUbUlg/71Okf0JPF+sUOd1eK3gOsZW9HeVCoAU7PQnyE11Om8E6 sS6gZMuedkTEfXqd/xVD1YXnKQqblT5f8eFleKBFUp/vAiZMeNQcIipx7rnvVt/ll9Uu 9mHRc3DHfk/aTwhlMRip4vom8tuzXoQIsez0ReSP4b0CjeSgxsj4NH62jq+8KEvS0+1m fnGLmqV8dTH+kuNaNVhz9L19nilur6W/OhSnolsi83obQW3Q+dGI1+Hze/6PZMUCMTNE SLKQ== X-Received: by 10.15.44.136 with SMTP id z8mr15272417eev.33.1390292113751; Tue, 21 Jan 2014 00:15:13 -0800 (PST) Received: from [192.168.42.236] (83-224.197-178.cust.bluewin.ch. [178.197.224.83]) by mx.google.com with ESMTPSA id z42sm4186203eel.3.2014.01.21.00.15.12 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 21 Jan 2014 00:15:13 -0800 (PST) Message-ID: <52DE20A3.7050909@gmail.com> Date: Tue, 21 Jan 2014 08:24:19 +0100 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.2.0 MIME-Version: 1.0 To: The development of GNU GRUB Subject: Re: [PATCH] add a exit condition even for no stop case References: <20140120194615.GB18265@beren.lan> In-Reply-To: <20140120194615.GB18265@beren.lan> X-Enigmail-Version: 1.6 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="HahbIISWH2UJeVoCIEMJIFcAXOnv9M6wM" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4013:c00::22c X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jan 2014 08:15:34 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --HahbIISWH2UJeVoCIEMJIFcAXOnv9M6wM Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Go ahead for trunk On 20.01.2014 20:48, Paulo Flabiano Smorigo wrote: > Hi all, >=20 > As I said in the my last email, I'm running tests in a network with > heavy traffic, like, over 150 arp requests comming every second. Under = these > condition, I found an issue in the receive_packets function. >=20 > On line 1456 of 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. >=20 > 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 > (like mine) this never happens. >=20 > The result is that GRUB becomes muted and freeze. >=20 > I made a small fix that exits this loop if the incoming packages rearch= > a maximum level. I used 100 packages and it seems fine. >=20 > --- > grub-core/net/net.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/grub-core/net/net.c b/grub-core/net/net.c > index 683ab28..f2e723b 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 =3D 1; > } > - while (1) > + while (received < 100) > { > /* Maybe should be better have a fixed number of packets for eac= h card > and just mark them as used and not used. */=20 >=20 --HahbIISWH2UJeVoCIEMJIFcAXOnv9M6wM Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Using GnuPG with Icedove - http://www.enigmail.net/ iF4EAREKAAYFAlLeIKMACgkQmBXlbbo5nOtD1gEAjQlVORbAcUt1mKEq+ehjmw4U tBlBVDyOyEkcu9wFLQkA/1D2N3FKzIrX4KPICwgvikWOcBtJAkPv+Ya8nMNUM9tp =ZlCC -----END PGP SIGNATURE----- --HahbIISWH2UJeVoCIEMJIFcAXOnv9M6wM--