From patchwork Sat May 8 03:22:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Leizhen (ThunderTown)" X-Patchwork-Id: 1475780 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1:d65d:64ff:fe57:4e05; helo=desiato.infradead.org; envelope-from=linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=desiato.20200630 header.b=kA1rsqVL; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=bhTdEI9k; dkim-atps=neutral Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FcXhG4fvNz9sWl for ; Sat, 8 May 2021 13:23:10 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=VaYIsLcpz/BFoCF8WxDQmjXlwpf4fIE5MD+bytraTZA=; b=kA1rsqVLkSZwvIcTNwszCkrAz0 chOITw8vZdFMolVLDPIAF8EcGdD2lu1Y5BbzJsgulpLqGrJsYwOm52QQ/gK9wT9pLsK9oDhd199N+ pnFfXbgCbZcU/3tf46i25IiLSJMHmDFJhz43xXJqMDmZP+yoH4acj1jHLSMEgwJS5dxO4F7qejm7L seQetYvBP19KL0sBQh6KF82ASLUO25IHEsznDfZOcxgcjVtgk1APUI74KTO/itW6wEHl4tic2EUlo D30m547/nEGumtoGnlTrZRcdWw6UHATkL0SMjgDhBF9ojUeENbyy1vprADRE3TnT3YF5/Bpj+7QqY 6ZQDt69w==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lfDYV-008ePY-TY; Sat, 08 May 2021 03:23:04 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lfDYT-008ePH-U9 for linux-um@desiato.infradead.org; Sat, 08 May 2021 03:23:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Type: Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject:CC:To:From: Sender:Reply-To:Content-ID:Content-Description:In-Reply-To:References; bh=IzkfJ0jDaNfh2ggGHz1IhsW1MH717j1ecV12HiOeuaU=; b=bhTdEI9kLuOjibOWkH8arAEaym yWCS2TBEM5ktY9jla7HMbhXZdTTkgPDPdqe4PPWEariMHxnKXGe/QwoadDHEislC1hD7zo3xnV999 Ca5FWck6tGI+m0XlUunWJ4Xc2596wmZPaJoyq3DYWOBT8NNCkTBsSEvmvtH4fItfYT1ahtxVBnbmC D0ja0bOn8KSAjmFcLRiAaYABBWkA2woo8yRii0KHeq4E+oSgVwRB/DUcDJsamSRVMkOayOVVT0ubg HIQjbaw/y1DekomM+A2S3fFgxTiexnKI6UTwNJgjN63EVeVmOCYLciaxUbNGCA5fx3keUgNMmlGk5 XYNDrmkg==; Received: from szxga06-in.huawei.com ([45.249.212.32]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lfDYR-007LIA-9E for linux-um@lists.infradead.org; Sat, 08 May 2021 03:23:00 +0000 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4FcXdV0tY9zlc1h; Sat, 8 May 2021 11:20:46 +0800 (CST) Received: from thunder-town.china.huawei.com (10.174.177.72) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.498.0; Sat, 8 May 2021 11:22:44 +0800 From: Zhen Lei To: Jeff Dike , Richard Weinberger , "Anton Ivanov" , Andrew Morton , Eduard-Gabriel Munteanu , linux-um , linux-kernel CC: Zhen Lei Subject: [PATCH 1/1] um: fix error return code in winch_tramp() Date: Sat, 8 May 2021 11:22:39 +0800 Message-ID: <20210508032239.2177-1-thunder.leizhen@huawei.com> X-Mailer: git-send-email 2.26.0.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.174.177.72] X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210507_202259_500602_DAE586EC X-CRM114-Status: UNSURE ( 9.16 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 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, [...] Content analysis details: (-2.3 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [45.249.212.32 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [45.249.212.32 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-um@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-um" Errors-To: linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org 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 Acked-By: anton.ivanov@cambridgegreys.com Tested-by: Nathan Chancellor --- 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;