From patchwork Mon Jul 19 14:53:00 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: 479945 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp4241245jao; Mon, 19 Jul 2021 08:39:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxTA4pkZD6+F83fNMJClYBntStfyYEB6ry+2bnZoSwWD91sqWW9q8M52ryP/uNfDPMvZ1k/ X-Received: by 2002:a05:6602:2e11:: with SMTP id o17mr10344088iow.55.1626708769870; Mon, 19 Jul 2021 08:32:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626708769; cv=none; d=google.com; s=arc-20160816; b=045KXGdoE1Kxu1CbFQarIvvaNLmFiIElcMXELQPGHxmKRocRb7l0AxyOadxxyVVA6V s3ffHqp73cmPn8XWHonanmVbGdRDN+PU0Ue0g9Rys6nKVtNjD8j3eTMhJc8q/jklNkb5 7uq35RAfjyX+KMyRDw45yOoB2NsOmYo1nRFS6gEnnM6v+CWoE5/s7ZqSgPOiL985dYWi M47mS+7OKgwH156uIi75zRHNGePwaB6atBiXcAYw6n9TKD1CfGG4ViEHfSFmpxOPfaxG Cutp9oesinAgzBbPIOVY5IPyeOiNFUjPRJnzawijrCFin9dnYGPj6JIoEAIcMwJJjVuQ tKuA== 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=L+92934g8skFGCKHTl68BngjY0Y7doqo7vKm1KuFXaQ=; b=XaMplnPwUn6DSh/0L+dLEftOodkrjyW2HU8tOihkPPIrTdGkl3nnMpyZGpt+GjEOPA JFLlkqCSx4HxuMtfDJp+y3QFGfmBNhI0O4AqRm2ah4vigsit5BuD8449X6s5BCGnPGi6 6IN2ik+F8E+EtdZ8GTQ81JtwMa8ovGGrcDmbKWkWi8M6w3m/rqM1GKU6pnnrjzfyWO4r sXH879LdvistnrXRbDVsuLh0z7bn1GUWiINYCkgrTfjXFSEEbnws0xcrbp/zv1jvNA0A 7q9R/Yn2CY3NQmenTkWN9ZMyI9TNpsLnusFLZgukWjlmCIAEeKYf91eh6DzNNyyYnCKi OfuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=swfYa9EP; 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 g5si10245056ilk.74.2021.07.19.08.32.49; Mon, 19 Jul 2021 08:32:49 -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=swfYa9EP; 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 S243326AbhGSOvv (ORCPT + 12 others); Mon, 19 Jul 2021 10:51:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:40448 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344241AbhGSOsn (ORCPT ); Mon, 19 Jul 2021 10:48:43 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C341261175; Mon, 19 Jul 2021 15:27:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626708453; bh=BMwHAXZgdhqQwUQ5+UshBBH8/SkY4gFxYKmSeVWpeAA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=swfYa9EPYqzX7ffKJW5QFjGyDGPcLqCQDYTeVqIMVu47dFxaBm9yMvQ12PLIdPqeT URACfNdm7BGwSr5FExquZpTklxRVW1EE8/boiRwczicHCXlliKrw3hAWY+Dhn6ZLuM rWVCMTpXb0D8YZcl13yxUzmcyL03PjrnASQZEeqI= 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 4.14 291/315] um: fix error return code in winch_tramp() Date: Mon, 19 Jul 2021 16:53:00 +0200 Message-Id: <20210719144953.020883433@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210719144942.861561397@linuxfoundation.org> References: <20210719144942.861561397@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 3fd7c3efdb18..feb7f5ab4084 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;