From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1aeRZP-0001fq-EC for mharc-grub-devel@gnu.org; Fri, 11 Mar 2016 13:13:51 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52277) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aeRZM-0001eB-Lx for grub-devel@gnu.org; Fri, 11 Mar 2016 13:13:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aeRZJ-0001W1-CM for grub-devel@gnu.org; Fri, 11 Mar 2016 13:13:48 -0500 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:63671) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aeRZJ-0001Vk-5e for grub-devel@gnu.org; Fri, 11 Mar 2016 13:13:45 -0500 Received: from pps.filterd (m0001255.ppops.net [127.0.0.1]) by mx0b-00082601.pphosted.com (8.15.0.59/8.15.0.59) with SMTP id u2BIBkec017877; Fri, 11 Mar 2016 10:13:42 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fb.com; h=subject : to : references : cc : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=facebook; bh=teT0++kCpG5wk8AId/sydjVZ86NyYjK1m1OkFWnQSfs=; b=Qi1kW9XGxAgQVa4n8A2IgC9MDotcUgvzQR4rSwRpTwBPpjUckrJRK0AIlRVAaAa6qekH ywUjRgUVN32U+EGQB8i/fpJjnrX6mEZlaue/q1j2OOH40rrDMBlahhrWFqAkgOTy7JIp 03ElkUDd2lpQxdIcYkk1u0zz2/epBJxPgGw= Received: from mail.thefacebook.com ([199.201.64.23]) by mx0b-00082601.pphosted.com with ESMTP id 21kue0j15w-1 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Fri, 11 Mar 2016 10:13:42 -0800 Received: from localhost.localdomain (192.168.54.13) by mail.TheFacebook.com (192.168.16.17) with Microsoft SMTP Server (TLS) id 14.3.248.2; Fri, 11 Mar 2016 10:13:38 -0800 Subject: Re: [PATCH 1/3] push/pop errno in initrd read file path To: "Vladimir 'phcoder' Serbinenko" , The development of GNU GRUB References: <1457713715-31708-1-git-send-email-jbacik@fb.com> From: Josef Bacik Message-ID: <56E30AD0.80702@fb.com> Date: Fri, 11 Mar 2016 13:13:36 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [192.168.54.13] X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2016-03-11_09:, , signatures=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 67.231.153.30 Cc: "kernel-team@fb.com" 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, 11 Mar 2016 18:13:49 -0000 On 03/11/2016 12:23 PM, Vladimir 'phcoder' Serbinenko wrote: > > > On Friday, March 11, 2016, Josef Bacik > wrote: > > If you try to load an initrd from http and it errors out we will > free the initrd > context but continue on because net_tcp_socket_close() will reset > the grub_errno > as will grub_initrd_close(). So we'll lose the errno and return > GRUB_ERR_NONE > instead of the original error. Add push/pulls to the appropriate > places so we > don't lose our errno. Thanks, > > Close functions shouldn't do this. Can you fix them instead? Also please > add [2.02] to the subjectwhen appropriate, like in this case. > So do we not want close functions to do grub_error() at all? Seems like there may be some cases where we want to know there was an error closing a tcp socket or the initrd? Maybe not, just want to make sure before I go make these two functions void. Thanks, Josef