From: Marcelo Tosatti Subject: Re: [PATCH] device-assignment: Don't deassign when the assignment fails Date: Fri, 11 Jun 2010 14:12:24 -0300 Message-ID: <20100611171224.GB6913@amt.cnet> References: <20100610162015.13106.3162.stgit@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org To: Alex Williamson Return-path: Received: from mx1.redhat.com ([209.132.183.28]:32644 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755744Ab0FKRri (ORCPT ); Fri, 11 Jun 2010 13:47:38 -0400 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5BHlbCo027122 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 11 Jun 2010 13:47:38 -0400 Content-Disposition: inline In-Reply-To: <20100610162015.13106.3162.stgit@localhost.localdomain> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, Jun 10, 2010 at 10:20:15AM -0600, Alex Williamson wrote: > The last thing assign_device() does is call into KVM_ASSIGN_PCI_DEVICE. > If that fails, the device is not assigned, so we shouldn't then try to > deassign it. If you try to assign the same device multiple times, you > can get into a nasty fail-succeed-fail-succeed loop. And we certainly > shouldn't take the assigned_out branch before we've even attempted > to assign the device. > > Signed-off-by: Alex Williamson Applied, thanks.