Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MDoij-0000Or-VT for mharc-grub-devel@gnu.org; Mon, 08 Jun 2009 19:57:42 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MDoii-0000Og-Dz for grub-devel@gnu.org; Mon, 08 Jun 2009 19:57:40 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MDoic-0000L2-SS for grub-devel@gnu.org; Mon, 08 Jun 2009 19:57:39 -0400 Received: from [199.232.76.173] (port=56197 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MDoic-0000Kz-ND for grub-devel@gnu.org; Mon, 08 Jun 2009 19:57:34 -0400 Received: from mail-bw0-f212.google.com ([209.85.218.212]:64080) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MDoic-0004M0-9X for grub-devel@gnu.org; Mon, 08 Jun 2009 19:57:34 -0400 Received: by bwz8 with SMTP id 8so1772036bwz.42 for ; Mon, 08 Jun 2009 16:57:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=PcnFRDQySvaqtUHospk8hUmfPVsLG1iNB2nvesMXICs=; b=jMP59Wm6yth0u9tgpBlgoTxHQVOWFh2zPmwGY7C2kct5vBZ97KX569GyvP4PqWFkCO 3h9unR1TiwuhAoZIg6EkJY1O1HLH8CsM+qtliaRGL+y+ytwEsu1KWcJ4ua+cOatwrA7i 7hK0UoA0+PF7KXVWYhjO5LgykqHv9nphdqmJ4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=JiSzuz5oLEPQytnWrbSq/xHoGAG81aXxN2h6XGXqI1tscFa2P4jJTv79zgNfF/EjTG t/XJA98QTEFaVE2KiIoKG3m+KiVEtkaCQAnlc9UGBCULNv6WtiZccUos7ZcFh6wrgErO BmFNEROZeEur/KMM732Q3wIEX9PGnUa5LT8sQ= MIME-Version: 1.0 Received: by 10.204.116.8 with SMTP id k8mr7233289bkq.117.1244505452967; Mon, 08 Jun 2009 16:57:32 -0700 (PDT) In-Reply-To: <6d6c12960906071137k6b66ec89iabd5efeb7aec8cb7@mail.gmail.com> References: <6d6c12960906071137k6b66ec89iabd5efeb7aec8cb7@mail.gmail.com> Date: Tue, 9 Jun 2009 01:57:32 +0200 Message-ID: From: "Vladimir 'phcoder' Serbinenko" To: The development of GRUB 2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: [PATCH] Link usb controller struct only when initialised X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2009 23:57:41 -0000 Commited with small stylistic change: comments start with an uppercase letter and end with 2 spaces On Sun, Jun 7, 2009 at 8:37 PM, Oliver Henshaw wrote: > When controller initialisation is aborted in grub_uhci_pci_iter > (grub_ohci_pci_iter) control > jumps to "fail:", where any allocated memory is freed. However, the > struct grub_uhci *u > (struct grub_ohci *o) for that controller remains linked to the list > of UHCI (OHCI) > controllers. This causes problems later, when grub iterates over > controllers to initialise > their ports. > > The solution is to link only when the usb controller is successfully > initialised, and just > before returning from the function. > > This patch is tested with real hardware and with qemu and the rescue image. > > > Thanks, > Oliver > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel > > -- Regards Vladimir 'phcoder' Serbinenko