Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2219558/?format=api
{ "id": 2219558, "url": "http://patchwork.ozlabs.org/api/patches/2219558/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260403120933.466259-1-sahilchandna@linux.microsoft.com/", "project": { "id": 28, "url": "http://patchwork.ozlabs.org/api/projects/28/?format=api", "name": "Linux PCI development", "link_name": "linux-pci", "list_id": "linux-pci.vger.kernel.org", "list_email": "linux-pci@vger.kernel.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260403120933.466259-1-sahilchandna@linux.microsoft.com>", "list_archive_url": null, "date": "2026-04-03T12:09:29", "name": "PCI: hv: Fix double ida_free in hv_pci_probe error path", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "6fa9403a0b839bb510cf7be9780175dc274b07bd", "submitter": { "id": 93047, "url": "http://patchwork.ozlabs.org/api/people/93047/?format=api", "name": "Sahil Chandna", "email": "sahilchandna@linux.microsoft.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260403120933.466259-1-sahilchandna@linux.microsoft.com/mbox/", "series": [ { "id": 498620, "url": "http://patchwork.ozlabs.org/api/series/498620/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/list/?series=498620", "date": "2026-04-03T12:09:29", "name": "PCI: hv: Fix double ida_free in hv_pci_probe error path", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/498620/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2219558/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2219558/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <linux-pci+bounces-51803-incoming=patchwork.ozlabs.org@vger.kernel.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "linux-pci@vger.kernel.org" ], "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=linux.microsoft.com header.i=@linux.microsoft.com\n header.a=rsa-sha256 header.s=default header.b=VGRZVRmQ;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c0a:e001:db::12fc:5321; helo=sea.lore.kernel.org;\n envelope-from=linux-pci+bounces-51803-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)", "smtp.subspace.kernel.org;\n\tdkim=pass (1024-bit key) header.d=linux.microsoft.com\n header.i=@linux.microsoft.com header.b=\"VGRZVRmQ\"", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=13.77.154.182", "smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=linux.microsoft.com", "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=linux.microsoft.com" ], "Received": [ "from sea.lore.kernel.org (sea.lore.kernel.org\n [IPv6:2600:3c0a:e001:db::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fnHf771XKz1xtJ\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 03 Apr 2026 23:12:15 +1100 (AEDT)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id 11F6D30630BE\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 3 Apr 2026 12:09:49 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id D4F6136657D;\n\tFri, 3 Apr 2026 12:09:48 +0000 (UTC)", "from linux.microsoft.com (linux.microsoft.com [13.77.154.182])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 8005B34B194;\n\tFri, 3 Apr 2026 12:09:47 +0000 (UTC)", "from sahil.mshome.net (unknown [4.213.232.22])\n\tby linux.microsoft.com (Postfix) with ESMTPSA id 34E1C20B710C;\n\tFri, 3 Apr 2026 05:09:43 -0700 (PDT)" ], "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1775218188; cv=none;\n b=kB0amESjbgqcnwTdEG4yyiL9YJMWoXKuCm9ieMLaILz7jqIqZCDLDEyOTEY6Z64U5vEg0wKSJd4Z2GZMIo0e/U6mq4byWEy8KH+jrVli0+LAIJzbW2MmOV9FQKVXwwOp8GLNeznKNMHtWHVm2+iVr1MFOe1J4JeGQHiWjBA1N+U=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1775218188; c=relaxed/simple;\n\tbh=YYDYm4S7nHjSSy9rQXrUmj5T3h3mRo6RF5nyXftKLbE=;\n\th=From:To:Subject:Date:Message-ID:MIME-Version;\n b=BYCRttiPr/6yDj61cw2zSv2bPPaeUUDI8izfYbdIhsT+iuqd3EgnwE8694vLCjc0vv1CpeoQUIEY5mu8W6NsKePqPKc2sYcRcKK9hpRQ2/vrDPuTUsz1+qV+nf3uJzprpA9VZ24qDIP/4gYW5TeqnJa1SFOtsrcub5XKpB+brck=", "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=linux.microsoft.com;\n spf=pass smtp.mailfrom=linux.microsoft.com;\n dkim=pass (1024-bit key) header.d=linux.microsoft.com\n header.i=@linux.microsoft.com header.b=VGRZVRmQ;\n arc=none smtp.client-ip=13.77.154.182", "DKIM-Filter": "OpenDKIM Filter v2.11.0 linux.microsoft.com 34E1C20B710C", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com;\n\ts=default; t=1775218186;\n\tbh=Vuxgk6ql5X6By2TYEOWqLh2LkbnCZf6KxtJii1TfRXs=;\n\th=From:To:Subject:Date:From;\n\tb=VGRZVRmQdsf72a0TKNvRovPA3iCQoA0sYnJKOesrVawlnS8fbC8x31YAiIeES7FRz\n\t Y2JaIdtEeFZzuWf8GJ+J7ZjbSQ5af5P+l2W5WTC5RPlCq4pElezsqeKqFuHS8eXoKO\n\t cZ3YhcvX/CHmUTmwWeD18QtCtaoKgjduqZoXG/ws=", "From": "Sahil Chandna <sahilchandna@linux.microsoft.com>", "To": "kys@microsoft.com,\n\thaiyangz@microsoft.com,\n\twei.liu@kernel.org,\n\tdecui@microsoft.com,\n\tlongli@microsoft.com,\n\tlpieralisi@kernel.org,\n\tkwilczynski@kernel.org,\n\tmani@kernel.org,\n\trobh@kernel.org,\n\tbhelgaas@google.com,\n\tdan.j.williams@intel.com,\n\tmhklinux@outlook.com,\n\tlinux-hyperv@vger.kernel.org,\n\tlinux-pci@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org", "Subject": "[PATCH] PCI: hv: Fix double ida_free in hv_pci_probe error path", "Date": "Fri, 3 Apr 2026 05:09:29 -0700", "Message-ID": "<20260403120933.466259-1-sahilchandna@linux.microsoft.com>", "X-Mailer": "git-send-email 2.53.0", "Precedence": "bulk", "X-Mailing-List": "linux-pci@vger.kernel.org", "List-Id": "<linux-pci.vger.kernel.org>", "List-Subscribe": "<mailto:linux-pci+subscribe@vger.kernel.org>", "List-Unsubscribe": "<mailto:linux-pci+unsubscribe@vger.kernel.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit" }, "content": "If hv_pci_probe() fails after storing the domain number in\nhbus->bridge->domain_nr, there is a call to free this domain_nr via\npci_bus_release_emul_domain_nr(), however, during cleanup, the bridge\nrelease callback pci_release_host_bridge_dev() also frees the domain_nr\ncausing ida_free to be called on same ID twice and triggering following\nwarning:\n\n ida_free called for id=28971 which is not allocated.\n WARNING: lib/idr.c:594 at ida_free+0xdf/0x160, CPU#0: kworker/0:2/198\n Call Trace:\n pci_bus_release_emul_domain_nr+0x17/0x20\n pci_release_host_bridge_dev+0x4b/0x60\n device_release+0x3b/0xa0\n kobject_put+0x8e/0x220\n devm_pci_alloc_host_bridge_release+0xe/0x20\n devres_release_all+0x9a/0xd0\n device_unbind_cleanup+0x12/0xa0\n really_probe+0x1c5/0x3f0\n vmbus_add_channel_work+0x135/0x1a0\n\nFix this by letting pci core handle the free domain_nr and remove\nthe explicit free called in pci-hyperv driver.\n\nFixes: bcce8c74f1ce (\"PCI: Enable host bridge emulation for PCI_DOMAINS_GENERIC platforms\")\nSigned-off-by: Sahil Chandna <sahilchandna@linux.microsoft.com>\n---\n drivers/pci/controller/pci-hyperv.c | 4 +---\n 1 file changed, 1 insertion(+), 3 deletions(-)\n\n--\n2.53.0", "diff": "diff --git a/drivers/pci/controller/pci-hyperv.c b/drivers/pci/controller/pci-hyperv.c\nindex 2c7a406b4ba8..5616ad5d2a8f 100644\n--- a/drivers/pci/controller/pci-hyperv.c\n+++ b/drivers/pci/controller/pci-hyperv.c\n@@ -3778,7 +3778,7 @@ static int hv_pci_probe(struct hv_device *hdev,\n \t\t\t\t\t hbus->bridge->domain_nr);\n \tif (!hbus->wq) {\n \t\tret = -ENOMEM;\n-\t\tgoto free_dom;\n+\t\tgoto free_bus;\n \t}\n\n \thdev->channel->next_request_id_callback = vmbus_next_request_id;\n@@ -3874,8 +3874,6 @@ static int hv_pci_probe(struct hv_device *hdev,\n \tvmbus_close(hdev->channel);\n destroy_wq:\n \tdestroy_workqueue(hbus->wq);\n-free_dom:\n-\tpci_bus_release_emul_domain_nr(hbus->bridge->domain_nr);\n free_bus:\n \tkfree(hbus);\n \treturn ret;\n", "prefixes": [] }