Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1LtVDu-00080e-1O for mharc-grub-devel@gnu.org; Mon, 13 Apr 2009 19:05:54 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LtVDs-00080I-74 for grub-devel@gnu.org; Mon, 13 Apr 2009 19:05:52 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LtVDr-000800-77 for grub-devel@gnu.org; Mon, 13 Apr 2009 19:05:51 -0400 Received: from [199.232.76.173] (port=39587 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LtVDr-0007zs-03 for grub-devel@gnu.org; Mon, 13 Apr 2009 19:05:51 -0400 Received: from [74.93.104.97] (port=60004 helo=sunset.davemloft.net) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LtVDq-0002Cq-IS for grub-devel@gnu.org; Mon, 13 Apr 2009 19:05:50 -0400 Received: from localhost (localhost [127.0.0.1]) by sunset.davemloft.net (Postfix) with ESMTP id BFB3435C12A for ; Mon, 13 Apr 2009 16:05:41 -0700 (PDT) Date: Mon, 13 Apr 2009 16:05:41 -0700 (PDT) Message-Id: <20090413.160541.135038849.davem@davemloft.net> To: grub-devel@gnu.org From: David Miller In-Reply-To: <20090412.235611.12718373.davem@davemloft.net> References: <20090412.235611.12718373.davem@davemloft.net> X-Mailer: Mew version 6.2.51 on Emacs 22.1 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: Re: grub: Eliminate recursive reads of the same device in grub_dl_load_file(). 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, 13 Apr 2009 23:05:52 -0000 From: David Miller Date: Sun, 12 Apr 2009 23:56:11 -0700 (PDT) > > Openfirmware block device drivers do not allow for multiple concurrent > opens of the same device. It simply does not work. > > Fortunately grub doesn't actually need to do this, it just happens > to do so. Here is the fix for the case of module dependency handling. > > The other case that hits this problem is in the FS_UUID support code. > I have patches later which will fix that case too, but that one is a > little more involved as we have to fix some bugs in the the ieee1275 > devalias iterator first (for one, it doesn't stop when the callback > returns non-zero as every other iterator in grub2 does). > > 2009-04-12 David S. Miller > > * kern/dl.c (grub_dl_load_file): Close file immediately when > we are done using it. I've committed this change as well.