From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1LyjAh-00059w-CK for mharc-grub-devel@gnu.org; Tue, 28 Apr 2009 05:00:11 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LyjAf-00058L-Kb for grub-devel@gnu.org; Tue, 28 Apr 2009 05:00:09 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LyjAe-00057o-Ms for grub-devel@gnu.org; Tue, 28 Apr 2009 05:00:09 -0400 Received: from [199.232.76.173] (port=55470 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LyjAe-00057g-7x for grub-devel@gnu.org; Tue, 28 Apr 2009 05:00:08 -0400 Received: from [74.93.104.97] (port=53367 helo=sunset.davemloft.net) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LyjAc-0001Du-AD; Tue, 28 Apr 2009 05:00:06 -0400 Received: from localhost (localhost [127.0.0.1]) by sunset.davemloft.net (Postfix) with ESMTP id 42EB135C184; Tue, 28 Apr 2009 01:59:59 -0700 (PDT) Date: Tue, 28 Apr 2009 01:59:59 -0700 (PDT) Message-Id: <20090428.015959.47492200.davem@davemloft.net> To: grub-devel@gnu.org, proski@gnu.org From: David Miller In-Reply-To: <1240871171.11406.106.camel@mj> References: <1240809937.4158.50.camel@ct> <20090426.225757.05232059.davem@davemloft.net> <1240871171.11406.106.camel@mj> 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) Cc: Subject: Re: Revision 2136 breaks two-disk configuarion 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: Tue, 28 Apr 2009 09:00:10 -0000 From: Pavel Roskin Date: Mon, 27 Apr 2009 18:26:11 -0400 > On Sun, 2009-04-26 at 22:57 -0700, David Miller wrote: > >> grub_disk_open() isn't used, but a grub_device_open() does occur >> during the iterator that has us find the FS_UUID device. This >> happens search_fs_uuid(). >> >> If we don't do this, we leave a device reference open and dangling. > > Then we should be using grub_device_close(). I've made a patch that > keeps dev, not disk in the data field. Unfortunately, the problem > persists. I could easily reproduce it on another machine by using a > flash drive and qemu. > > It's entirely possible that the problem is elsewhere. But I have no > experience debugging memory problems in GRUB, so it will take time > before I find out. > > Here's the patch. It doesn't make the memory problem go away, but it > makes the code nicer by using the same abstraction to open and close the > disk. > I like this patch, please commit it.