From patchwork Sat May 8 03:13:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Leizhen (ThunderTown)" X-Patchwork-Id: 1475779 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=Tz0uG7G6; 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=s2+gS5oU; 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 4FcXWF3mw4z9sVv for ; Sat, 8 May 2021 13:15:21 +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=PYrz31HSLxRujdaTKXekXud+LEozXPq+oVu27SQl248=; b=Tz0uG7G6bNga8fTZZruxJcbHeq sbqN2l0JZlfcCQ5U3wzYJFbd3ybye5IcSR/Jjd2glvTbvkBcYo35KhlXJJ3IZFpsBV56ZTYT6rDg4 xdnqqp6sAtLz+YKsvicdug+1xlEVyyyaJEELTuW6fBvbbR6RJlhzCkm07fqMTSWUafUjn66p4+XlW qJol/TGhjWNdYmFG1yFDu+0GMRSQufUHFF/UG4zf7qxjPfAR50R0rNzbWOs558fTqIQ6ZeJooRJo/ EDad8V5/DTbHUjSMrVHwBUeO0x8K6yabx0ytljp/mY63+QGombzsnSRYDCeJ2Ol1GvybuUXohRrZi H8Guz6tg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lfDQn-008dKk-Dd; Sat, 08 May 2021 03:15:05 +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 1lfDQl-008dK0-Le for linux-um@desiato.infradead.org; Sat, 08 May 2021 03:15:03 +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=D+G/lDpOILvLVBtwgGoNiL1uZrLUJZb5C6bVI5uaOqY=; b=s2+gS5oU8jBTAhJ2SC7yJiI3nB 2MqDmtBNhinjHV0/IhkzJWRU97g0+Oc+nDoHlgVqBcJ1TcVKDBMjQ2dJrN9MBNZSHBkIGl3yF3YVD hcjdws0C/S6fnBSiOH+K959Ij/MXbbWoegU1OQWZzh4XfjEWifck3rSj6qGof0JxPn5LevK+yiTK5 ladTRWGt1QzLxJbUlDLJR4fYLX+pxeRav0Pevycaep0TBdl4PSJ4AlKeN/4geuqUzBM/8DYPziB+5 si46/jjpSujfnVT5MwNcHjREwMgzhoaKb7O/U7PgGkTLfM1l6QnRxxgVDGh3nAJnMRzEzUQhqk28W yNZ+z0Ag==; Received: from szxga04-in.huawei.com ([45.249.212.190]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lfDQh-007L8m-CM for linux-um@lists.infradead.org; Sat, 08 May 2021 03:15:01 +0000 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4FcXRh4x6sz16Pbg; Sat, 8 May 2021 11:12:16 +0800 (CST) Received: from thunder-town.china.huawei.com (10.174.177.72) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.498.0; Sat, 8 May 2021 11:14:43 +0800 From: Zhen Lei To: Jeff Dike , Richard Weinberger , "Anton Ivanov" , Andrew Morton , linux-um , linux-kernel CC: Zhen Lei Subject: [PATCH 1/1] um: fix error return code in slip_open() Date: Sat, 8 May 2021 11:13:54 +0800 Message-ID: <20210508031354.2127-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_201459_606509_0877C0BA X-CRM114-Status: UNSURE ( 8.59 ) 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: a3c77c67a443 ("[PATCH] uml: slirp and slip driver cleanups and fixes") Reported-by: Hulk Robot Signed-off-by: Zhen Lei --- arch/um/drivers/slip_ [...] 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.190 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [45.249.212.190 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: a3c77c67a443 ("[PATCH] uml: slirp and slip driver cleanups and fixes") Reported-by: Hulk Robot Signed-off-by: Zhen Lei Acked-By: anton.ivanov@cambridgegreys.com --- arch/um/drivers/slip_user.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/um/drivers/slip_user.c b/arch/um/drivers/slip_user.c index 482a19c5105c..7334019c9e60 100644 --- a/arch/um/drivers/slip_user.c +++ b/arch/um/drivers/slip_user.c @@ -145,7 +145,8 @@ static int slip_open(void *data) } sfd = err; - if (set_up_tty(sfd)) + err = set_up_tty(sfd); + if (err) goto out_close2; pri->slave = sfd;