From patchwork Mon Jul 19 14:52:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 480012 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp4280237jao; Mon, 19 Jul 2021 09:22:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyn3676Py8HqqhbNHhGp3OiNRdYZUvR2Qojs0VvidJNh6QHTv7XN7dYVnxPomFrgqOE/fBp X-Received: by 2002:a05:6402:752:: with SMTP id p18mr35735149edy.281.1626711734737; Mon, 19 Jul 2021 09:22:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626711734; cv=none; d=google.com; s=arc-20160816; b=siY8uuJuU4hKF3Q/z0AfXCZU6Mlc4wwe+gQIH87DECJHLaszKAeUaez12W60+mPT2P UQJeHPyC/O0TWCfAHFIRK4BVvoUT/0Auf1bkGHtpMnDRfeCVoIxJKPbt64VAb5iIJQVf h+qKTRvVfc6nCmo/vjhAy5myIsPALO9DtNgELjwyaMn/UxwA37R6c9N2RoKKqbZRudVo f6vR/OcFaQtiBaC15re3i5xo0/qFvmOhrKwPuR2a08KkIVplhkIsZK5oqElw2YVH5cur WOwcdRcIVM2QlyJwAEyAwsNqcmfVH0zkjFe6UOJZC1lkARzcfi0RrWmW+lZvWGfywcXa PIIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=1UEzVc9AoRQpwYmboFp2OBGW0WlLtHjgdpBZbHl4ssk=; b=b+KV+quY3WkuqF3/Fu7lJwTf2gfKYhxzyYQY2dOUskkRZ70Lz6owA65iOIYTsBeGJI Hk6HB1v3jly1LhiM3VP0GG5EUvKvr37TEac9Jg1EwGmNchT05mEzXWLfsPS9znIX4VxB EMwREaAqEKpRtOon5MllbKxGVawDulE0x0Yhm7LnyS86/p5/44Xu6uLKwjkrMLt0n3o9 UbyCS1qfQbAXO9QW+YF/ODvFnRJJODIqsiv+MJGzGXCKqjPZpZMPtD/q59NGloPYioO9 iCBMc5z+Vwu1KYGCmN5SNhe0qDSh8xoyDS7FIdYFD6krQ32QCXUIRqGL96Exvu4rHLJo ccrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ab7WSZ04; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id la14si22045543ejc.142.2021.07.19.09.22.14; Mon, 19 Jul 2021 09:22:14 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ab7WSZ04; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235300AbhGSPkm (ORCPT + 12 others); Mon, 19 Jul 2021 11:40:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:59768 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236510AbhGSPeR (ORCPT ); Mon, 19 Jul 2021 11:34:17 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B1F4461431; Mon, 19 Jul 2021 16:11:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626711073; bh=x+P2Do7ryklMpG80dXcyjkEdqfS8QeylccWxHEDQ6Ps=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ab7WSZ04DZLtrwrfZhrf98UGSHDy3TKsciJcHZU3p35x9TsH+ZjQXYxm0u2ffPiCL HQrdfgEXpiKXKrLvXBHBpOMFQA3wIt7rvt39dl6Mnxi4uXP0Riu2elLa27FEWaDaAD Nctqp6YyEeJk+Kgz6QbASXHAOUjtcXNlAqpicLyg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Zhen Lei , anton.ivanov@cambridgegreys.com, Richard Weinberger , Sasha Levin Subject: [PATCH 5.13 218/351] um: fix error return code in winch_tramp() Date: Mon, 19 Jul 2021 16:52:44 +0200 Message-Id: <20210719144952.171003498@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210719144944.537151528@linuxfoundation.org> References: <20210719144944.537151528@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Zhen Lei [ Upstream commit ccf1236ecac476d9d2704866d9a476c86e387971 ] 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 Signed-off-by: Richard Weinberger Signed-off-by: Sasha Levin --- arch/um/drivers/chan_user.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.30.2 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;