From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1LlO6X-00023i-Pz for mharc-grub-devel@gnu.org; Sun, 22 Mar 2009 09:52:45 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LlO6V-00022Y-KJ for grub-devel@gnu.org; Sun, 22 Mar 2009 09:52:43 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LlO6R-00022M-4h for grub-devel@gnu.org; Sun, 22 Mar 2009 09:52:43 -0400 Received: from [199.232.76.173] (port=50691 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LlO6Q-00022J-VW for grub-devel@gnu.org; Sun, 22 Mar 2009 09:52:39 -0400 Received: from fg-out-1718.google.com ([72.14.220.156]:16645) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LlO6Q-0005eU-H4 for grub-devel@gnu.org; Sun, 22 Mar 2009 09:52:38 -0400 Received: by fg-out-1718.google.com with SMTP id l27so242367fgb.7 for ; Sun, 22 Mar 2009 06:52:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=YleXxmH/OkvRLajVNgbWL5kNLKbm7czOmzwix/Ku2EE=; b=a+86ymD6NEtU3yV6GpWZJj7vK8IHuLepbg0Itsrg8S2GCxrp8F6REKyHvycpHFAau0 9fvGj8XWayrDPb45YppIX6ify15UVbbK/OrnY0J7nMyIv5+9lqTOCRS+q1R9d+d1IFR6 TcuzCVH0rVCCvbv5I5xxxZ2674sbLtiYV1i1s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=pdWls4+Gn18TnVbvBsF5vHMEAzq0w4i2US8XvdERT4yxiCJH0gA0J+eHElp3cdrHaV la/VU6MSm+3SJqgxQeYTkCKFf6JLzC8CexgVb7hiskauMV8lTjgpW3mDq4zx56QBFtEm akt1Z2qOxdhQpoRLY3q0HwBGcygsUqT9ouU7U= Received: by 10.86.86.2 with SMTP id j2mr1837725fgb.74.1237729956987; Sun, 22 Mar 2009 06:52:36 -0700 (PDT) Received: from ?192.168.1.25? (252.80.3.213.cust.bluewin.ch [213.3.80.252]) by mx.google.com with ESMTPS id d4sm3059812fga.9.2009.03.22.06.52.36 (version=SSLv3 cipher=RC4-MD5); Sun, 22 Mar 2009 06:52:36 -0700 (PDT) Message-ID: <49C6429F.30604@gmail.com> Date: Sun, 22 Mar 2009 14:52:31 +0100 From: phcoder User-Agent: Thunderbird 2.0.0.21 (X11/20090318) MIME-Version: 1.0 To: The development of GRUB 2 References: <49B52C12.5080105@gmail.com> <49C638A0.3060506@gmail.com> <20090322134551.GA7324@thorin> In-Reply-To: <20090322134551.GA7324@thorin> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: Leak fixes 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: Sun, 22 Mar 2009 13:52:43 -0000 Robert Millan wrote: > On Sun, Mar 22, 2009 at 02:09:52PM +0100, phcoder wrote: >> >> - grub_disk_cache_invalidate (dev_id, disk_id, sector); >> - >> index = grub_disk_cache_get_index (dev_id, disk_id, sector); >> cache = grub_disk_cache_table + index; >> + >> + cache->lock = 1; >> + grub_free (cache->data); >> + cache->data = 0; >> + cache->lock = 0; > > Does this imply grub_disk_cache_invalidate() is not working properly? Can it > be fixed instead? > No it works fine. But it's used to say to cache subsystem "block number N on disk DISK" was updated. In this case when new block collides with old one old one has to be freed even if it's still valid -- Regards Vladimir 'phcoder' Serbinenko