From nobody Thu Sep 19 01:05:42 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1720047193; cv=none; d=zohomail.com; s=zohoarc; b=UuZa2NCPdSDfcoQ3dQcvExdEXAaDIP8y2OmFQxcis2hOyJe6Og6XRUwpYYnpo1z/Ujhz12w5WphgLs40pyomGHmi2NjvaHrGGpdbspxGUMXNPKeNfwluih4ZJQdQSxcZExxwEpL1V0dQXzMcy9ibP1t3uwc3lKzX45Bqn9f0ppY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1720047193; h=Content-Type:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=fFIfkLYWXfsdkRs/ADDmSifhmh+YyxsrJ8fplItaj14=; b=bcXzubbN52YybpxHwNiDus5WWiiNUere1SzrySmy13HtHirJzuzk6gC9mvCrTqW1PCk+J6V8s74koXNTQ6eZyOtso8eZrR3OEmmL24J7MSgZIehk07GdSwwWZ/dUamZ8ZsgJV8+lpnxmKQAGvVvhZduU0OR4yisc9qEZ2x9eDM8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1720047193685539.2812834554787; Wed, 3 Jul 2024 15:53:13 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sP8oG-0006c9-1M; Wed, 03 Jul 2024 18:50:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sP8oE-0006RN-Pk for qemu-devel@nongnu.org; Wed, 03 Jul 2024 18:50:42 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sP8oA-0007ZL-66 for qemu-devel@nongnu.org; Wed, 03 Jul 2024 18:50:42 -0400 Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-576-wPaCuijON3SRSusQH0g80g-1; Wed, 03 Jul 2024 18:50:36 -0400 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-421179fd82bso13485e9.1 for ; Wed, 03 Jul 2024 15:50:36 -0700 (PDT) Received: from redhat.com ([2a0d:6fc7:441:91a8:a47d:5a9:c02f:92f2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3675a0cd784sm16993260f8f.7.2024.07.03.15.50.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jul 2024 15:50:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1720047037; 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: in-reply-to:in-reply-to:references:references; bh=fFIfkLYWXfsdkRs/ADDmSifhmh+YyxsrJ8fplItaj14=; b=a+dgtwMExna07Q+Yk2RQP6C11GLDuepbkYIlLcJz2Y4Gfm8FqE3XpxNrHDMAjSrPcNUe8B OX7fvQSE/+EhkLI42eSWayywO+/eiFf3pBtMogLWNIRE6L9QhBidKPDXDI/PU569FIZ9rF rKIPYtyRj4B1ZBbrNDeVIJmLnhRltxM= X-MC-Unique: wPaCuijON3SRSusQH0g80g-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720047034; x=1720651834; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=fFIfkLYWXfsdkRs/ADDmSifhmh+YyxsrJ8fplItaj14=; b=lKbFhRVbdBreI13OX91GxflR+GrvmsuwRDacpGIeARfe8YgeaiBbgn/J7BirSFO4+n SJqlrgwroXncBQwWlGBih4B2SYoyQbjNaXZ3bez8w4sUR0WP/S47A4NKCam6y4QZ+MX6 XKKv7C/aOPoDL0JBD5MG+NO1D08QgnOb5svcxhONkyOcMhxo/26IsBrhe29N+HUMtkBz YrjUW/t7+h/DefXtLyGQdjMtyhMQe4aUpoZTeYt3XRddH6Xno5kosE8ni/lsiD60FliW 4hSG/FdY6nceM86er0DX1vsqkmQO77tFptvjZXEc7v8T/lRssUzEIU+0RZC5xggcVgTf pOag== X-Gm-Message-State: AOJu0YyX3RD0HwRpyayk17gDeJaiqlNQm3HL5kKhphcYDD3/29E94VQH zkhzT1sjdChhn+ylluHCfbCviB1k9pHIXnUoryuQSi+hwZ47qInMbsF6Otw97M6F6V7tQ6T6vn/ 17/8A67xAFsholfDUuOHy8G7El5Z/vjijFR70pgygbD+hA+Rj/Vx3irjKHNOvTHuS+xrcdSV34e wmMF/xxKWINyq2gKx+gmjzaLQr2rymMA== X-Received: by 2002:a05:600c:4b95:b0:424:8ae8:d9fe with SMTP id 5b1f17b1804b1-4264a3d9714mr366415e9.6.1720047034720; Wed, 03 Jul 2024 15:50:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGN5JPfXc4OuhVvccE5GcBK3xl0DMhGcdDpFU/R0Nlctq5mW8jzjvAbxFdcynxz4GMitiowJw== X-Received: by 2002:a05:600c:4b95:b0:424:8ae8:d9fe with SMTP id 5b1f17b1804b1-4264a3d9714mr366315e9.6.1720047034135; Wed, 03 Jul 2024 15:50:34 -0700 (PDT) Date: Wed, 3 Jul 2024 18:50:30 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Cc: Peter Maydell , Akihiko Odaki , Marcel Apfelbaum Subject: [PULL v3 82/85] pcie_sriov: Release VFs failed to realize Message-ID: <1a9bf009012e590cb166a4a9bae4bc18fb084d76.1720046570.git.mst@redhat.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, T_SPF_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1720047194743100003 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Akihiko Odaki Release VFs failed to realize just as we do in unregister_vfs(). Fixes: 7c0fa8dff811 ("pcie: Add support for Single Root I/O Virtualization = (SR/IOV)") Signed-off-by: Akihiko Odaki Message-Id: <20240627-reuse-v10-7-7ca0b8ed3d9f@daynix.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/pci/pcie_sriov.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/pci/pcie_sriov.c b/hw/pci/pcie_sriov.c index faadb0d2ea..9bd7f8acc3 100644 --- a/hw/pci/pcie_sriov.c +++ b/hw/pci/pcie_sriov.c @@ -99,6 +99,8 @@ bool pcie_sriov_pf_init(PCIDevice *dev, uint16_t offset, vf->exp.sriov_vf.vf_number =3D i; =20 if (!qdev_realize(&vf->qdev, bus, errp)) { + object_unparent(OBJECT(vf)); + object_unref(vf); unparent_vfs(dev, i); return false; } --=20 MST