Received: from eggs.gnu.org ([2001:4830:134:3::10]:58174) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YmooJ-0005M8-SS for qemu-devel@nongnu.org; Mon, 27 Apr 2015 15:35:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YmooG-0007Pe-JL for qemu-devel@nongnu.org; Mon, 27 Apr 2015 15:35:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33344) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YmooG-0007Pa-Dn for qemu-devel@nongnu.org; Mon, 27 Apr 2015 15:35:16 -0400 Date: Mon, 27 Apr 2015 16:35:13 -0300 From: Eduardo Habkost Message-ID: <20150427193513.GE25766@thinpad.lan.raisama.net> References: <1426024655-17561-2-git-send-email-ehabkost@redhat.com> <1426610796-27439-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <1426610796-27439-1-git-send-email-afaerber@suse.de> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH for-next] pc: Ensure non-zero CPU ref count after attaching to ICC bus List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas =?iso-8859-1?Q?F=E4rber?= Cc: Paolo Bonzini , "Michael S. Tsirkin" , qemu-devel@nongnu.org, Richard Henderson On Tue, Mar 17, 2015 at 05:46:36PM +0100, Andreas F=E4rber wrote: > Setting the parent bus of a device increases its ref count, which we > ultimately want to level out. However it is only safe to do so after th= e > last reference to the device in local code, as qom-set or similar opera= tions > might decrease the ref count. >=20 > Therefore move the object_unref() from pc_new_cpu() into its callers. >=20 > The APIC operations on the last CPU in pc_cpus_init() are still potenti= ally > insecure, but that is beyond the scope of this code movement. >=20 > Signed-off-by: Andreas F=E4rber Applied, thanks. --=20 Eduardo