Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3932357imm; Mon, 8 Oct 2018 11:54:42 -0700 (PDT) X-Google-Smtp-Source: ACcGV60V2sf4H1pb+hdCF7G3Y5ZtWgGYz7lp9ELgF6HSobUeJgsn3zrmACrNmdgTIBqgfiu3Te9Q X-Received: by 2002:a63:d208:: with SMTP id a8-v6mr20742098pgg.99.1539024882670; Mon, 08 Oct 2018 11:54:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539024882; cv=none; d=google.com; s=arc-20160816; b=GtkojNE3mnAzBRoK7yrcS40VmORK+7cuj9F8Ln1Ye3Ec5eUYx2qeLl76FQ5vgJ0LIC TBH99xW8C3trupe4nnvTjRbNAt2+L3fKm6eLxzZqGHU/6gqwXGyPuXIcCkdrP97TRqaN fC1syb9Lnloga+bvoRW5i69cMDVmmdfF9qQVqNSyBwyLM9ILf9MVHM6bfS872v0RyaaO MfEuwdscJn2oXpKZsGz3KvsFAxVKdSpNmjo9RSjQq5uWUfU3pxo05y2tdnI+WfT8a5C/ 3IdnltmhllfCVy39Qk0cyWAmZPRygbzwqPEHo5sMEv7erk+L73XFz7lcupDnCKqNDhkA 52dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Po4Fob0uQIb99XyVjFz37vOYJ0QYScBh8lfNpNSL2IU=; b=tiCS3n8zuH03zR6ZSFvzY6ULHeb4T7hQ/1EzEF70wxDC/RvKzv6Mh+Tl8rOcKVFluk YDR+JChHlfTQhxZY8OU2mF8Bs54/CezTWAejHMzVSDnDiKbn5z6v7y+AN8gaUc/lRxHU F0AfmQ3hlfLztiXCo4xk84j98gX5O+AfE8g7y7BE/1SAtgXKweuBC9tWeVf7m9ImLoJR X56mM7rG357zT7cljlEX/V7cXXsQbmFnNuZRn2ifNPTyIB3OrFNd+QjSN/7ohStrfGl3 GVa2cHQ/Yh50UvqtuWjJ2PwdYLDnsiGBzIPMrxHK9zONyj1lMTa56H0mxVkzdtWtgKUU W7VA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=aVESG4SW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r68-v6si20012334pfk.151.2018.10.08.11.54.27; Mon, 08 Oct 2018 11:54:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=aVESG4SW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732872AbeJICHL (ORCPT + 99 others); Mon, 8 Oct 2018 22:07:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:57676 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727670AbeJICHL (ORCPT ); Mon, 8 Oct 2018 22:07:11 -0400 Received: from localhost (ip-213-127-77-176.ip.prioritytelecom.net [213.127.77.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 911D220645; Mon, 8 Oct 2018 18:54:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539024843; bh=x+9q0vHNFzAWQE2XWhfvwERxq5zD9WqaJpBXPyR3BSU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aVESG4SW48vhJlo3IFwwZW1hicS9FsQFSh5F7gukob+k406prUhvTjlw1P95AaQi4 Yq4nqEC9FMahpmte1mNwRn+pEH+7pI5+6/AnPb817dhOj/jh3FFfVSKu/W8jApz+mi Ert3CFf6tZQpmscIQ0sTeLDCZ+zVjg1iPz1Weffg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vitaly Kuznetsov , "K. Y. Srinivasan" Subject: [PATCH 4.18 164/168] tools: hv: fcopy: set error in case an unknown operation was requested Date: Mon, 8 Oct 2018 20:32:24 +0200 Message-Id: <20181008175626.288037183@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181008175620.043587728@linuxfoundation.org> References: <20181008175620.043587728@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Vitaly Kuznetsov commit c2d68afba86d1ff01e7300c68bc16a9234dcd8e9 upstream. 'error' variable is left uninitialized in case we see an unknown operation. As we don't immediately return and proceed to pwrite() we need to set it to something, HV_E_FAIL sounds good enough. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Cc: stable Signed-off-by: Greg Kroah-Hartman --- tools/hv/hv_fcopy_daemon.c | 1 + 1 file changed, 1 insertion(+) --- a/tools/hv/hv_fcopy_daemon.c +++ b/tools/hv/hv_fcopy_daemon.c @@ -234,6 +234,7 @@ int main(int argc, char *argv[]) break; default: + error = HV_E_FAIL; syslog(LOG_ERR, "Unknown operation: %d", buffer.hdr.operation);