Received: by 10.213.65.68 with SMTP id h4csp182449imn; Tue, 13 Mar 2018 00:10:11 -0700 (PDT) X-Google-Smtp-Source: AG47ELspx0lhZFK4jNMclD2ndkLJU+FkxiY3QXD3iibseYaVRIGjlPdqIAxoH3dxhO3Xy17rGHL6 X-Received: by 10.101.101.4 with SMTP id x4mr8911701pgv.275.1520925010980; Tue, 13 Mar 2018 00:10:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520925010; cv=none; d=google.com; s=arc-20160816; b=HLQhL7KrxojdVJB1WJuobo/LQIk4HeCI5uXy4XM5mheEJCk3mg7yNRTazKSNhttiNQ PXd6NxWChuXkm61xjZrFUg+3wHEpZoVcXmUQqWJOflT2ZfN/pvPUvn6tqOV1xvWPvJCp /s2nw+xcKoM3Puze6FCoQPhjy3gYgf3D35Erf8WXNhlpq+a0b0fqmFso0VCPogHx9pUv yOP2KMNKl8mizpRTp0jZ37wDUKadW/5F02a2iD3ge+Gzh2Ze8jfZ87IJ/9jjSJM2WSEJ nfYt7eNKR00rmHvyZMdKbilEkZyxT4y4kppPGv5xH4hpOVitp7r9EKYXvYY2ts5efdVJ Ukgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:from:subject:arc-authentication-results; bh=Qkem5sQKtjStdKJIRfG6E8OmoJHnnY9uSiNa0HZX8Os=; b=dK+q8qnC0826QTCBAG+I+15NbsnbZV/RUqioGEu20Ovevm2Wa1zHic1p7bBZit5087 WvS6cspoZEhF2i/BHDItz6JFOsxKqLxgZO8bu/hTSf0gVSScifJ1AJ0R1icZOXU97V// z47WBmHAfZYvo4Gt7cXqU98tOHOb2OiK7SDIwk+sQ1NAal40oyqZEjkESz9KYrthgPsS ZfJAIUN1Bj4dVY0v0RwnnPSn1y6h9JT1c47DGvmGK2V+guO3zSp2yImp9AfoNXyb4/eE u6MeN7JaeunHai4otEogzasCEayqJiNfhxmvwbFdfJEsOIaNEvmaGYnPjRSV4HtHyHCi dRWg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=sourceforge.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d88si7149001pfe.215.2018.03.13.00.09.57; Tue, 13 Mar 2018 00:10:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=sourceforge.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752140AbeCMHIh (ORCPT + 99 others); Tue, 13 Mar 2018 03:08:37 -0400 Received: from mout.web.de ([217.72.192.78]:60547 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751892AbeCMHIe (ORCPT ); Tue, 13 Mar 2018 03:08:34 -0400 Received: from [192.168.1.2] ([77.181.227.194]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0McFLP-1fBG140UeV-00JWj7; Tue, 13 Mar 2018 08:08:13 +0100 Subject: Re: [2/9] um/drivers/vector_user: Less checks in user_init_raw_fds() after error detection From: SF Markus Elfring To: user-mode-linux-devel@lists.sourceforge.net, Anton Ivanov , Jeff Dike , Richard Weinberger Cc: user-mode-linux-user@lists.sourceforge.net, kernel-janitors@vger.kernel.org, LKML References: Message-ID: Date: Tue, 13 Mar 2018 08:08:04 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:Yl2lAMqJDewEh4ri1zrLMnLs98GSsLuxo03rrEU7CVA+DtnbmY3 pF17V6fOPjOtEkJqBKmxHgC41PsaxWS/XmEVWuUysDOBrgUqi094w/wBS1JfGGlz26RwBl8 msTTCqPCYgNU6lw5E4XVsxVQe7TnEukId2GpOoXRKDCuBx78xl+3Qk8PmyUJ712P0Kl1MRe QyDFac35C43eXdB+evaJw== X-UI-Out-Filterresults: notjunk:1;V01:K0:BV05YNK2AMI=:dsI03Mn8z7q7CQut49HAbP LpvpA5aAp/LXWKm6UmeuJbOgjMi6FfjmYEPki1+r8jXU5YFvw/g3FAIyNYjdyiK3fOZ5PH/vR mF0+yMTNqTlimJu7SfIjVKsbcwYgfwqthTNwhxxxoneKyot/YdxH0CvWOTSWeXqr3Ks+2L3b5 DMe3iY/GBLfesy0CY710BVb4HJYrBO+G8QDdRkL2OkquQUZp55p6nT7dUKblFyhPcgHbM2ekj ngBBCZsQpCMAZLVLOV4CGVS8Lf8xMltotiw21G9YKrKvX3WDCbhSyCfYYD4nwvEqg1N9A5uVM AloYfRSyCjvQAoef0+3X4MiAtQib6NlBPj2vM1yEyOviZQDsvFsQSlHsOMnghwWdUti3oykJy 8tdK+JQncsnIMdSy96b4S/W66Zrv2tBzhm4+/kJKbXohhmEWGMoFWMhi9scT6y07+RmnOQwN0 litMyJIUwMnoGZW/9qMWiokw7bR5YsCLVom4x/eCCtj3Bju3nfS4FmoqfcGsLdjWfvtCOGxbO wOTEGRDua+gRoa9NvzLxCLwLA54jsQFtxCyc9Ib9F8sNTAYfnNKGK3oQBpId+SacmO7FlfDWi B1su7HEObQnhUSpC0T6SPgrtnTncOAAH5iu59fRyoS1vzDubGCUKAegEYNms3SEzkYlbveo37 Cm3e+9rJfGLRHPpMOzKamI64DtS6hNkvf698WMjaz4XJ/LR+UNE1Ul18LJtr+anuhI0C6EVce 9AspAE8nvP8Ck2DkZ7K0qu2tWeNgLAT+QmuTtVmQX1k/yBckc4zY85wCZngwuY+ZJDx3Ph82m 82PvbiBRGjpn1LjpJyND+yCmsxJpyvd2OnZ4ce7N5jn7hl7kJM= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > +set_error_code: > + err = -errno; > + os_close_file(rxfd); I have taken another look at this change idea. Now I notice that I should have preserved a sanity check there. if (rxfd >= 0) os_close_file(rxfd); Regards, Markus