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=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham 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 82920CA9EAF for ; Thu, 24 Oct 2019 23:15:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5C62921BE5 for ; Thu, 24 Oct 2019 23:15:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728043AbfJXXPV (ORCPT ); Thu, 24 Oct 2019 19:15:21 -0400 Received: from mga07.intel.com ([134.134.136.100]:10812 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726395AbfJXXPV (ORCPT ); Thu, 24 Oct 2019 19:15:21 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Oct 2019 16:15:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,226,1569308400"; d="scan'208";a="202447455" Received: from sjchrist-coffee.jf.intel.com (HELO linux.intel.com) ([10.54.74.41]) by orsmga006.jf.intel.com with ESMTP; 24 Oct 2019 16:15:20 -0700 Date: Thu, 24 Oct 2019 16:15:20 -0700 From: Sean Christopherson To: Jim Mattson Cc: kvm@vger.kernel.org, Paolo Bonzini , John Sperbeck , Junaid Shahid Subject: Re: [PATCH v3 1/3] kvm: Don't clear reference count on kvm_create_vm() error path Message-ID: <20191024231520.GH28043@linux.intel.com> References: <20191024230327.140935-1-jmattson@google.com> <20191024230327.140935-2-jmattson@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191024230327.140935-2-jmattson@google.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Thu, Oct 24, 2019 at 04:03:25PM -0700, Jim Mattson wrote: > Defer setting the reference count, kvm->users_count, until the VM is > guaranteed to be created, so that the reference count need not be > cleared on the error path. > > Suggested-by: Sean Christopherson > Signed-off-by: Jim Mattson > Reviewed-by: Junaid Shahid > --- Reviewed-and-tested-by: Sean Christopherson