From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Lo2Rx-0001ni-1x for mharc-grub-devel@gnu.org; Sun, 29 Mar 2009 17:21:49 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lo2Ru-0001nR-Vh for grub-devel@gnu.org; Sun, 29 Mar 2009 17:21:46 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lo2Rt-0001nF-K6 for grub-devel@gnu.org; Sun, 29 Mar 2009 17:21:45 -0400 Received: from [199.232.76.173] (port=52510 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lo2Rt-0001nC-Ev for grub-devel@gnu.org; Sun, 29 Mar 2009 17:21:45 -0400 Received: from fg-out-1718.google.com ([72.14.220.155]:54995) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Lo2Rt-0005BI-4Q for grub-devel@gnu.org; Sun, 29 Mar 2009 17:21:45 -0400 Received: by fg-out-1718.google.com with SMTP id l27so232686fgb.7 for ; Sun, 29 Mar 2009 14:21:44 -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=EmQ5NyzTeuNOzjlxSDO9dTq20Y9dkf8A6n5t7M5VAlA=; b=BSn08cqQjHoLjAeYECruSGmvLwmUKT43fhWmcbrEunDdXdb1O8Op84oYJujpGe2Ksm zz+E/q+nGOx3oy3Wnhoti7eLpD/wmx77RKZeuarNWxak1iR1oM4998RbzEDE8ojjeh3E kiTi/RtqRQufOLPY+XoPTMGUAvT9sBvUKe83s= 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=xzx683KQKDxFvgUU+qQzLSm/u+lPuDRwmPfbVyq/fLjMneLhMb6u40lfx3NDLMAd3k haovjM+ZNjqQ52yyUdn4EEK9hLOhwYHmyfp2sZAYHU0LC9biU6UUh7KIBKrXWFENoqfA 7eqdtmErjOEFAUxoZMAQFKTwUHP8wmTlBv+uU= Received: by 10.86.68.1 with SMTP id q1mr1383787fga.62.1238361704376; Sun, 29 Mar 2009 14:21:44 -0700 (PDT) Received: from ?192.168.1.2? (107-205.0-85.cust.bluewin.ch [85.0.205.107]) by mx.google.com with ESMTPS id e11sm4656532fga.15.2009.03.29.14.21.43 (version=SSLv3 cipher=RC4-MD5); Sun, 29 Mar 2009 14:21:43 -0700 (PDT) Message-ID: <49CFE64C.10402@gmail.com> Date: Sun, 29 Mar 2009 23:21:16 +0200 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> <49C6429F.30604@gmail.com> In-Reply-To: <49C6429F.30604@gmail.com> 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, 29 Mar 2009 21:21:47 -0000 committed phcoder wrote: > 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