From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1ZdC8Z-0005N7-8b for mharc-grub-devel@gnu.org; Sat, 19 Sep 2015 03:00:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38792) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZdC8W-0005Mp-Pm for grub-devel@gnu.org; Sat, 19 Sep 2015 03:00:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZdC8R-0003WZ-Ce for grub-devel@gnu.org; Sat, 19 Sep 2015 03:00:40 -0400 Received: from mail-la0-x233.google.com ([2a00:1450:4010:c03::233]:36188) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZdC8R-0003Vc-49 for grub-devel@gnu.org; Sat, 19 Sep 2015 03:00:35 -0400 Received: by lanb10 with SMTP id b10so41772364lan.3 for ; Sat, 19 Sep 2015 00:00: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=SfjtQY5R4LJyFqNdC1QQDP5sW7WDIDryoYEr7d866kE=; b=MK+ZgYXw/jfmixhf/iqyvgQyU1VuGo0BRbazZBnLVNPSGHGsUxrwy/VvSXT5g0H9aU FJs7j0MN7mWlWUuM7EeFSMgfv/vA9OLwDL6qjv5wSwQQaMsxyvbkGQoWuTR5nCDAyUll Pq9F/mAFApqcR5LB3VOBEq+Tc37d3BCd3NbfzX+6n630dald1OF9VDwalhAFkqzCUAHZ aGkYGPhBtyiiic94lf08BZtCz2wgGrfAv+ZZOFW1ylExHsgXR2NxB75U4Vnh9EcHSlWF 0OUlCu7bMILwu/zu7HD4KqQxpQq9YKyrEGBeLziwsmpPty50ikwP3qxv177bTDFmAQ2G Qr4g== X-Received: by 10.112.64.72 with SMTP id m8mr4367782lbs.41.1442646034155; Sat, 19 Sep 2015 00:00: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 h6sm1930591laf.15.2015.09.19.00.00.33 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 19 Sep 2015 00:00:33 -0700 (PDT) Subject: Re: Add check when store disk cache To: The development of GNU GRUB References: <55FB8D15.40604@gmail.com> From: Andrei Borzenkov Message-ID: <55FD0810.30703@gmail.com> Date: Sat, 19 Sep 2015 10:00:32 +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::233 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: Sat, 19 Sep 2015 07:00:41 -0000 18.09.2015 12:07, Arch Stack пишет: > I want to use the part of the filesystem codes in GRUB to read different > filesystems on Windows. I have almost completed it and I will release it in > a few days. > But it crash sometimes because of the write of zero pointer.I debug it and > find why it crashed. Please show stack trace of crash. GRUB does not run multithreaded so something different must happen. > When I apply this patch, it won't crash because of this > reason. > > On Fri, Sep 18, 2015 at 12:03 PM, Andrei Borzenkov > wrote: > >> 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 >>> >>> >> >> _______________________________________________ >> Grub-devel mailing list >> Grub-devel@gnu.org >> https://lists.gnu.org/mailman/listinfo/grub-devel >> > > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel >