Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2225429/?format=api
{ "id": 2225429, "url": "http://patchwork.ozlabs.org/api/patches/2225429/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260421032044.55948-1-neilfsun@tencent.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": "<20260421032044.55948-1-neilfsun@tencent.com>", "list_archive_url": null, "date": "2026-04-21T03:20:44", "name": "[v2,v2] PCI/MSI: Fix memory leak in pci_alloc_irq_vectors_affinity INTx path", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "cf31ef04e841842418998277358fcf5124e38eb1", "submitter": { "id": 77323, "url": "http://patchwork.ozlabs.org/api/people/77323/?format=api", "name": "neilfsun", "email": "loyou85@gmail.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260421032044.55948-1-neilfsun@tencent.com/mbox/", "series": [ { "id": 500721, "url": "http://patchwork.ozlabs.org/api/series/500721/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/list/?series=500721", "date": "2026-04-21T03:20:44", "name": "[v2,v2] PCI/MSI: Fix memory leak in pci_alloc_irq_vectors_affinity INTx path", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/500721/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2225429/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2225429/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <linux-pci+bounces-52809-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 (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=JBfG/8Ho;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c15:e001:75::12fc:5321; helo=sin.lore.kernel.org;\n envelope-from=linux-pci+bounces-52809-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)", "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=\"JBfG/8Ho\"", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=209.85.210.181", "smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com", "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=gmail.com" ], "Received": [ "from sin.lore.kernel.org (sin.lore.kernel.org\n [IPv6:2600:3c15:e001:75::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 4g071q2FYCz1yHB\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 21 Apr 2026 13:21:51 +1000 (AEST)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sin.lore.kernel.org (Postfix) with ESMTP id F3E7B30080A6\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 21 Apr 2026 03:20:59 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 3E0DE314B63;\n\tTue, 21 Apr 2026 03:20:59 +0000 (UTC)", "from mail-pf1-f181.google.com (mail-pf1-f181.google.com\n [209.85.210.181])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 06C3E382293\n\tfor <linux-pci@vger.kernel.org>; Tue, 21 Apr 2026 03:20:57 +0000 (UTC)", "by mail-pf1-f181.google.com with SMTP id\n d2e1a72fcca58-82f4a53ae20so2857647b3a.3\n for <linux-pci@vger.kernel.org>; Mon, 20 Apr 2026 20:20:57 -0700 (PDT)", "from localhost.localdomain ([43.132.141.24])\n by smtp.gmail.com with ESMTPSA id\n d2e1a72fcca58-82f8e9f7735sm12385858b3a.21.2026.04.20.20.20.54\n (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256);\n Mon, 20 Apr 2026 20:20:56 -0700 (PDT)" ], "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776741659; cv=none;\n b=ct/nXRe4ZiqPIQS/qEwE3gNDKNZh1hQzgmNjl0Z21H5EBdN6BPQcABxSgSKXSEK0WAn+1OrlNcrYSnHTBPXGIqpaO38vq/Hh4EMiWt09W2kFuuOYSAMRHfHO2Uu44NIGH1SVBgayZfTdErlxYutUeytKfjw6bdYbjEUtc1GRF68=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776741659; c=relaxed/simple;\n\tbh=O2E4CdfZ7Usp5PY9isuYsA7nHK5C9A8Hkp3iAd5U0Pk=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=tYVdzF4oj1YB91yIpJ64z/Ie2FmcNJwylz/VY2NqyKfWqxh41Vwghj5AYoEUpEq5vBo6kdXGcvjgO88mUN0sd+xe/p9bDwMGrqIHwvqIkx3Lr2WVhqUKlVqFUksNtu6ruETBKdSgPZ+zfuGS2xVJ32bQvRe3kTvCnEmgy9cyZhs=", "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com;\n spf=pass smtp.mailfrom=gmail.com;\n dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=JBfG/8Ho; arc=none smtp.client-ip=209.85.210.181", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20251104; t=1776741657; x=1777346457;\n darn=vger.kernel.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=ubMnOeDkqTk2dHHLJbjBEoJK4qf4ceJn4yhDeONpxwI=;\n b=JBfG/8HocRcEihDnBYoRI1Uk03ykMJJbG1kb/1SgY81k+ZE1dMI0BrzE2u8TEMJ8VI\n PGXT7NuJTrryT7UCkUIY0SYstRGkhqEIWgvLXmDTxEBnBIa10NtoJintInvPmNqZXnj8\n A1KaJ6XbZ5wXsXCPidOSwZb8RQDTZCzenihJwBlCtz/nmdiNaCHix46uUDj6/3xnumgS\n uZqSdYV61tDRiqQMxutfXbu3yi7VeRCl5JBOJ5jYDqtecsbwdjhkAtFjl8xFzI19kkwZ\n O+KMBwqx07xa2wQv67T8Jjb/WJNfcHFD+ECxzIvzp0P+9C2snpo1UJJ/hxjPT4VwVaJ0\n dAlQ==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776741657; x=1777346457;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=ubMnOeDkqTk2dHHLJbjBEoJK4qf4ceJn4yhDeONpxwI=;\n b=eUzWKjC1zYL8L4D13Vz0AjmDPz+GlvxARubYc4AXXbGsXG3hE62GUyR2TXCCCND8Wf\n IOb+7idFDefVs3ylfDn/19q58PxCito8kppkpMpK8wIZzaNoZOMUYezxMZmlljSFIAnJ\n ztEXMvktGLOmfi4KDEe8/TvZUMgw+KZEweWIJcXcshEzBt6fQBA42L95UkNaKxVWGnY0\n VjJUUEydXMTLZtoRX2cOD34r3WDg3Y0sNaSKh6GHVp4F6+J3tbCZ36NCShIb/E3AemtT\n e373Jjky2cKTS8cXC3jcVasBWeJZCIhAW15ftnCeFgFOSTtF77y9lgIvalF7ba232sU3\n /BtQ==", "X-Forwarded-Encrypted": "i=1;\n AFNElJ9YrHI1jC2iDN6HLL/H7rRP1dePS5AaQw7h6FDQds27s7zp7jXtJ7SLCwY8w2voBb/j6keKN14M4b4=@vger.kernel.org", "X-Gm-Message-State": "AOJu0YxwkqwLVthH8/4zv8F4ka/3OMhZ/wmtE815W7G3I6f0W+5QnQVK\n\trajKU7wTzqKJ5v88A7npkgvtd4VawCqZH09RqIKV/M9jR9SXrn85leX1", "X-Gm-Gg": "AeBDietZfqhEr92vlWx2847fJ7ZYecRSWsW0oU5/QCJmsQZvQeoS/PoeMUHUT1bzgCw\n\t4K7PdkB9nBySUV5leVu2kVrH0Qtr/ZOu8df7qQOnUcX8v4OM/dbE58RLbhJ9vQoNMBZ0K+VcWeY\n\tYw9026JImYsGxhhC8SEZTiEXMtSi5gIbeXFEWNyu89dQP+2tWO6Ot2Y+Dc7cXAjFQB6kmLLeGqd\n\tRFLkZxXTnzEW7V5ehOBchQYNoRYbfoq9TRjNEzy6bUzOMGwgKbwH8u3dBATzbMu3wxBPqvyLd0E\n\t23WtQvrkos78yv1Z43UcxFx47FT/NUFc9sdPEoQ9oi60Z4cSx5H3hI8tsqcRi7Z9rDIFwNPWNDc\n\tEQUHZGRzuuT0hlV3lAhsrMlLpP1IGkSpi9veXuSE70KTeWpCo2uiyLVZxA0UnF7CL1xJ1KPBO3o\n\treBTHBvrnhTpVYWS8ZjGCaUdD7rpWmikmw4g3PQhas9IlSBRMcBlgnK5S5OO88dM0JLhc=", "X-Received": "by 2002:a05:6a00:bd0a:b0:82c:9897:70e6 with SMTP id\n d2e1a72fcca58-82f8c8e8aaemr17361158b3a.34.1776741657347;\n Mon, 20 Apr 2026 20:20:57 -0700 (PDT)", "From": "neilfsun <loyou85@gmail.com>", "X-Google-Original-From": "neilfsun <neilfsun@tencent.com>", "To": "18255117159@163.com", "Cc": "bhelgaas@google.com,\n\thans.zhang@cixtech.com,\n\tlinux-kernel@vger.kernel.org,\n\tlinux-pci@vger.kernel.org,\n\tloyou85@gmail.com,\n\tneilfsun@tencent.com,\n\tshawn.lin@rock-chips.com,\n\ttglx@kernel.org", "Subject": "[PATCH v2 v2] PCI/MSI: Fix memory leak in\n pci_alloc_irq_vectors_affinity INTx path", "Date": "Tue, 21 Apr 2026 11:20:44 +0800", "Message-ID": "<20260421032044.55948-1-neilfsun@tencent.com>", "X-Mailer": "git-send-email 2.52.0", "In-Reply-To": "<2caa071e-85ee-4e76-bb33-8f27a4579fac@163.com>", "References": "<2caa071e-85ee-4e76-bb33-8f27a4579fac@163.com>", "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": "In the INTx fallback path of pci_alloc_irq_vectors_affinity(),\naffinity masks are created and never freed.\n\nSigned-off-by: neilfsun <neilfsun@tencent.com>\nSigned-off-by: Sun Feng <loyou85@gmail.com>\nReviewed-by: Hans Zhang <18255117159@163.com>\n---\nv2: use __free to auto-release pointers\n---\n drivers/pci/msi/api.c | 6 ++++--\n 1 file changed, 4 insertions(+), 2 deletions(-)", "diff": "diff --git a/drivers/pci/msi/api.c b/drivers/pci/msi/api.c\nindex c18559b6272c..994f12813ce3 100644\n--- a/drivers/pci/msi/api.c\n+++ b/drivers/pci/msi/api.c\n@@ -285,8 +285,10 @@ int pci_alloc_irq_vectors_affinity(struct pci_dev *dev, unsigned int min_vecs,\n \t\t\t * the device driver can adjust queue configuration\n \t\t\t * for the single interrupt case.\n \t\t\t */\n-\t\t\tif (affd)\n-\t\t\t\tirq_create_affinity_masks(1, affd);\n+\t\t\tif (affd) {\n+\t\t\t\tstruct irq_affinity_desc *masks __free(kfree) =\n+\t\t\t\t\tirq_create_affinity_masks(1, affd);\n+\t\t\t}\n \t\t\tpci_intx(dev, 1);\n \t\t\treturn 1;\n \t\t}\n", "prefixes": [ "v2", "v2" ] }