Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp910195pxj; Sat, 8 May 2021 02:15:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzWrSi7N43vsB73hLwtCfvYJA4ADSOAmKcCkq1mdkyFyRnUZfb6P6+qHH4KirPh6H0pAERt X-Received: by 2002:a05:6a00:1642:b029:27f:2cae:eb7e with SMTP id m2-20020a056a001642b029027f2caeeb7emr14654303pfc.39.1620465335152; Sat, 08 May 2021 02:15:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620465335; cv=none; d=google.com; s=arc-20160816; b=wa8ijZISyeiBHUeEYB83QmgGOb618F0rJP56zOZUsKeU6inj5H5ISayylnlGm/r5xM pTZkuYSj/xjyiq7Dfb1yy3WgF17RCp2QPcmRFrWrPgBGOOUiD+G6nC3mUBdc8wATHt8L Xm+Y8kaUEPNXI+NgnMZq7592PpSe20bPcsa8DMnF1T6LxP1NBflzjNxRQAKOo6KiFOwQ FIfngNbbEUY72G+zXb7KFRsUbTC7zPeusoVCd25gOkolXqfXqSt2+QsQdCWu5KmWc4M8 PkWjLwu83gbhMAPBMz6VrEnwvxZH7nmUmuf2bkqGlLhrBdaAX+sNCYhJYuUKrzPoyuSr 34UQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:to:subject; bh=uN4QIqKTtlGlSySe3TE+QlwRUD7JDbV2qiMj1n59VZY=; b=s1awPz4OQuzD3ZM/lrm4cRNxBWvYWxZ1wIht1nxA0PKbrdG1j/FixGUgjvd2Dc9hRE k+ad6C6h9CP0cN8lyCCPzLiWhz0gwYPm9dioD/xSlCG0MkVq4SeFzA2ocdvXkHlaPxQC i42UyYVlJYEvlAV5vdwBOC1G8Y1eQAgXdb2CiXACsoYPq17QqJ96zalZ4bkVL3VmaHUy bmBYpruY59GbRcUpHfgC4sZkFiHh0+Kpw7CSziPv9/1h2Xauga3DLkh4KE6/9Vfx7oW5 A3cn1Kh9PAOdnoYbGR6zxtVbgF4QZj3NwdwNBUGmM6+ZFMiUmXILjvBNnRSY9iiMQPKl c6NQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t13si3687990pjf.39.2021.05.08.02.15.22; Sat, 08 May 2021 02:15:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230281AbhEHJOq (ORCPT + 99 others); Sat, 8 May 2021 05:14:46 -0400 Received: from ivanoab7.miniserver.com ([37.128.132.42]:54666 "EHLO www.kot-begemot.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229583AbhEHJOp (ORCPT ); Sat, 8 May 2021 05:14:45 -0400 Received: from tun252.jain.kot-begemot.co.uk ([192.168.18.6] helo=jain.kot-begemot.co.uk) by www.kot-begemot.co.uk with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lfJ1r-0005sH-PC; Sat, 08 May 2021 09:13:43 +0000 Received: from madding.kot-begemot.co.uk ([192.168.3.98]) by jain.kot-begemot.co.uk with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lfJ1p-0005PV-L8; Sat, 08 May 2021 10:13:43 +0100 Subject: Re: [PATCH 1/1] um: fix error return code in winch_tramp() To: Zhen Lei , Jeff Dike , Richard Weinberger , Andrew Morton , Eduard-Gabriel Munteanu , linux-um , linux-kernel References: <20210508032239.2177-1-thunder.leizhen@huawei.com> From: Anton Ivanov Organization: Cambridge Greys Message-ID: <01f2ebc7-effd-19f1-53cf-648cf81f811b@cambridgegreys.com> Date: Sat, 8 May 2021 10:13:41 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: <20210508032239.2177-1-thunder.leizhen@huawei.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -1.0 X-Spam-Score: -1.0 X-Clacks-Overhead: GNU Terry Pratchett Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/05/2021 04:22, Zhen Lei wrote: > Fix to return a negative error code from the error handling case instead > of 0, as done elsewhere in this function. > > Fixes: 89df6bfc0405 ("uml: DEBUG_SHIRQ fixes") > Reported-by: Hulk Robot > Signed-off-by: Zhen Lei > --- > arch/um/drivers/chan_user.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/arch/um/drivers/chan_user.c b/arch/um/drivers/chan_user.c > index d8845d4aac6a..6040817c036f 100644 > --- a/arch/um/drivers/chan_user.c > +++ b/arch/um/drivers/chan_user.c > @@ -256,7 +256,8 @@ static int winch_tramp(int fd, struct tty_port *port, int *fd_out, > goto out_close; > } > > - if (os_set_fd_block(*fd_out, 0)) { > + err = os_set_fd_block(*fd_out, 0); > + if (err) { > printk(UM_KERN_ERR "winch_tramp: failed to set thread_fd " > "non-blocking.\n"); > goto out_close; > Acked-By: anton.ivanov@cambridgegreys.com -- Anton R. Ivanov Cambridgegreys Limited. Registered in England. Company Number 10273661 https://www.cambridgegreys.com/