From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_DBL_ABUSE_MALW autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 867C6C35247 for ; Wed, 5 Feb 2020 22:28:50 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 55309217F4 for ; Wed, 5 Feb 2020 22:28:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="mc6BSJaX"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="EYXduHnO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 55309217F4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=NNzMm7jBqrl1n69n2x3XbtBXp7b3EE7IE+saHz8SYLA=; b=mc6BSJaXBRHCRb LEtf/wE734iIrxjSVZHT/Qr3LuW4744eZ9WGhMIfaqV9z3Ggs1HHHADyz0ttxT3ZZJ3g/BymCtMEJ iCit/23E3NzKXIjBsEla2rdfHTT/L0AT15RVPQsvaT1m7sDeVrbhnaSuf3DRbvs7UIpKem8s9O/Mc vaJzHA1KPySKGzCTxiMDkWPPYOFVtS9EpoC3K4rttoZc+eOCyWNvwo3p9wY1X34upnyUEKjSOmKFU w0xmQ798muXos845TvM/GAkiAZWs4w+W0UcQiCj3+kBZ3+CNJPOaXWgDppR7XPHNlglXOrRxKFcDf A1fBLLdEEGJ1CT/P2Fsw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1izTA2-0005ra-RQ; Wed, 05 Feb 2020 22:28:42 +0000 Received: from us-smtp-2.mimecast.com ([207.211.31.81] helo=us-smtp-delivery-1.mimecast.com) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1izT9y-0005rG-V9 for linux-arm-kernel@lists.infradead.org; Wed, 05 Feb 2020 22:28:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580941716; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TlZ291EmGopDCG5ErV/B6q6MCWpQFGiaDWjGBWMPhvg=; b=EYXduHnOunpeSVhd2v6DQ3Dh9Ih8wY2nGejwTkqwacbE2rcTsSvBkEajhHI9nXgd+VsEHm 7AFThfOyjrBRzb6rjKi/VVWqYTU3MiReYZSqry6LAwd7NTlu9sAbwpsvk3PkkXYtsTX3ae d+pQRAzY3YsYV6r/QsNiWWo2qRUllJs= Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-185-aKyGuqkPMVWjbHe6zM-KQQ-1; Wed, 05 Feb 2020 17:28:34 -0500 Received: by mail-qv1-f71.google.com with SMTP id l1so2450243qvu.13 for ; Wed, 05 Feb 2020 14:28:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=xN2n9jkJvkSR0RH/zWMkRvEj2quGdHH6HsawLgUOQOY=; b=sOFyAO3vaT+KQ1K/V9jFt8IXkZIhwhtC7C4hbskUopr8xiS5I7D9TTuva66c0rc6Wp reK1cSI63KUHcwkJyK0IGBQif5Nspj0uqg82vO/RV+/zuWt+xXb2WApRbp762J1y+5lt sFqH5w7AHswMyvaI/u4f07DiHoH8u+DfJlib4UnBZaugDYXYdansSish7Kj/XL/fp5zk cFk4v5kJJS6eEz2HAj5if5vbvneal/rxsr9SsFMI9BIM1bn4kSh8a/HKdqT88P++kVVe qj+PEZSlWguvBysAPODmyh0xDqzbKeMggICcs1BIJwo8uPTcZ+gTS4QnZ3DHiJP8YyRa M4oA== X-Gm-Message-State: APjAAAVmUFwwkFrIFORJOmThc954YuZamYJQruRnvipX5RWd7u8sqYOz yVkaNE9hAR/e0lt2hdfcBlKD13TsrtPXiQJDF8MB/G+96cL/eTdepQRKfhSmrFFFaxnI81L/PFB 6wIWeW+wqaHVO2EmqbpnfDKb8sQ/la7GagxM= X-Received: by 2002:a05:620a:a46:: with SMTP id j6mr13690qka.164.1580941714104; Wed, 05 Feb 2020 14:28:34 -0800 (PST) X-Google-Smtp-Source: APXvYqzgDC/fBZ4GnRbk3BQEXE+eWIhbbieAb4nE+MGEKdPSLikBImrRnbk5qAuaCcwE1K66PslinA== X-Received: by 2002:a05:620a:a46:: with SMTP id j6mr13650qka.164.1580941713724; Wed, 05 Feb 2020 14:28:33 -0800 (PST) Received: from xz-x1 ([2607:9880:19c8:32::2]) by smtp.gmail.com with ESMTPSA id c184sm503353qke.118.2020.02.05.14.28.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Feb 2020 14:28:33 -0800 (PST) Date: Wed, 5 Feb 2020 17:28:29 -0500 From: Peter Xu To: Sean Christopherson Subject: Re: [PATCH v5 03/19] KVM: Don't free new memslot if allocation of said memslot fails Message-ID: <20200205222829.GF387680@xz-x1> References: <20200121223157.15263-1-sean.j.christopherson@intel.com> <20200121223157.15263-4-sean.j.christopherson@intel.com> MIME-Version: 1.0 In-Reply-To: <20200121223157.15263-4-sean.j.christopherson@intel.com> X-MC-Unique: aKyGuqkPMVWjbHe6zM-KQQ-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200205_142839_080626_879E47FD X-CRM114-Status: UNSURE ( 9.67 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Wanpeng Li , kvm@vger.kernel.org, David Hildenbrand , linux-mips@vger.kernel.org, Paul Mackerras , kvmarm@lists.cs.columbia.edu, Janosch Frank , Marc Zyngier , Joerg Roedel , Christian Borntraeger , Julien Thierry , Suzuki K Poulose , kvm-ppc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jim Mattson , Cornelia Huck , Christoffer Dall , linux-kernel@vger.kernel.org, James Morse , Paolo Bonzini , Vitaly Kuznetsov , Philippe =?utf-8?Q?Mathieu-Daud=C3=A9?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Jan 21, 2020 at 02:31:41PM -0800, Sean Christopherson wrote: > The two implementations of kvm_arch_create_memslot() in x86 and PPC are > both good citizens and free up all local resources if creation fails. > Return immediately (via a superfluous goto) instead of calling > kvm_free_memslot(). > > Note, the call to kvm_free_memslot() is effectively an expensive nop in > this case as there are no resources to be freed. (I failed to understand why that is expensive.. but the change looks OK) > > No functional change intended. > > Acked-by: Christoffer Dall > Signed-off-by: Sean Christopherson Reviewed-by: Peter Xu -- Peter Xu _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel