From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Zcmti-00021W-6P for mharc-grub-devel@gnu.org; Fri, 18 Sep 2015 00:03:42 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54864) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zcmtf-00020k-SD for grub-devel@gnu.org; Fri, 18 Sep 2015 00:03:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zcmtb-0002Ym-Ih for grub-devel@gnu.org; Fri, 18 Sep 2015 00:03:39 -0400 Received: from mail-la0-x22c.google.com ([2a00:1450:4010:c03::22c]:34835) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zcmtb-0002Wx-A1 for grub-devel@gnu.org; Fri, 18 Sep 2015 00:03:35 -0400 Received: by lagj9 with SMTP id j9so23409782lag.2 for ; Thu, 17 Sep 2015 21:03:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-type:content-transfer-encoding; bh=1akq4nqyC03G62cwZtlqpzTBH/g0wdTERUG8AaZrGAQ=; b=FEQ5FFa1TVt72NrSGPIOBH4ge0d15werYkwR/Q4nHyq0GIypGi6Lxje6c9xC5+T5nz ns5IQASpjFWWPpgDrJRTO2fo1J2wxEz4A6QcZ86AaSH+wwyIYg3tubSLe2eA4hCGkIeM GeZXsW2qE9vd+HReOkK4wgRN1g38D6Pi3zxHkRPbty220c4bg//ftOlxkiustl8GhQgI 2e1qRQCzdOVTuTH+KcEkg7rO1OiZ20OFq0D2hQHo815axrHuY4vNSCO0wAWgqGObt0vv 7qRCAwE6gzC7/GGrN1JZ5aqmK7j3YLqq76hgAFV+7KEzXao4t35jrdlttwRLQX3XDrgM /vMQ== X-Received: by 10.112.87.69 with SMTP id v5mr2187773lbz.70.1442549014596; Thu, 17 Sep 2015 21:03:34 -0700 (PDT) Received: from [192.168.1.41] (ppp91-76-142-206.pppoe.mtu-net.ru. [91.76.142.206]) by smtp.gmail.com with ESMTPSA id jj4sm72519lbc.14.2015.09.17.21.03.33 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Sep 2015 21:03:34 -0700 (PDT) Subject: Re: Add check when store disk cache To: The development of GNU GRUB References: From: Andrei Borzenkov Message-ID: <55FB8D15.40604@gmail.com> Date: Fri, 18 Sep 2015 07:03:33 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::22c X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Sep 2015 04:03:40 -0000 18.09.2015 03:15, Arch Stack пишет: > I found that the function *grub_disk_cache_store* didn't check for > *cache->lock* before free *cache->data*, and didn't set *cache->lock* > before memcpy something to *cache->data*. If multi thread handle with the > same cache at the same time, it will cause a fault. Do you actually observe a problem or it is pure hypothesis? GRUB does not run multi-threaded and probably never will. > I have created a patch > for it. > > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel >