Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/2224326/?format=api
{ "id": 2224326, "url": "http://patchwork.ozlabs.org/api/1.2/patches/2224326/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260417092909.226412-1-zhenzhong.duan@intel.com/", "project": { "id": 28, "url": "http://patchwork.ozlabs.org/api/1.2/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": "<20260417092909.226412-1-zhenzhong.duan@intel.com>", "list_archive_url": null, "date": "2026-04-17T09:29:08", "name": "PCI: Initialize spinlock in new_id_store()", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "2e568d446a60ae6ea90d95c4330ab2ba7bc9045b", "submitter": { "id": 81636, "url": "http://patchwork.ozlabs.org/api/1.2/people/81636/?format=api", "name": "Zhenzhong Duan", "email": "zhenzhong.duan@intel.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260417092909.226412-1-zhenzhong.duan@intel.com/mbox/", "series": [ { "id": 500293, "url": "http://patchwork.ozlabs.org/api/1.2/series/500293/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/list/?series=500293", "date": "2026-04-17T09:29:08", "name": "PCI: Initialize spinlock in new_id_store()", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/500293/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2224326/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2224326/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <linux-pci+bounces-52705-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=intel.com header.i=@intel.com header.a=rsa-sha256\n header.s=Intel header.b=P2skoy1V;\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-52705-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)", "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com\n header.b=\"P2skoy1V\"", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=198.175.65.15", "smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=intel.com", "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=intel.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 4fxqdP6S7zz1yGt\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 17 Apr 2026 19:41:13 +1000 (AEST)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id 73295336A987\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 17 Apr 2026 09:32:30 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id C7AAB39FCD7;\n\tFri, 17 Apr 2026 09:29:23 +0000 (UTC)", "from mgamail.intel.com (mgamail.intel.com [198.175.65.15])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 81C7B3B4EB4;\n\tFri, 17 Apr 2026 09:29:22 +0000 (UTC)", "from orviesa009.jf.intel.com ([10.64.159.149])\n by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 17 Apr 2026 02:29:22 -0700", "from unknown (HELO gnr-sp-2s-612.sh.intel.com) ([10.112.230.229])\n by orviesa009-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 17 Apr 2026 02:29:21 -0700" ], "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776418163; cv=none;\n b=PxrG2HTdZL2woyslOCJ0iAOm1DhOtMGlfU9S1hmxxyrhqTyA837yr0dx2HGU07XgwJYfkwPRIa5B6i2ZE+b88EPjdKIsqOSr0K5eXVe34C4PxMVYbXgeANwhE6mU5LI+0Wx9A15LibSi+F8+EUL1ErgMtiYK4/dQZoylL88i1Q8=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776418163; c=relaxed/simple;\n\tbh=f7SLMYJoEHgSW/CGZ7RB6uXd2lxRreqr5d2o/92XbyY=;\n\th=From:To:Cc:Subject:Date:Message-ID:MIME-Version;\n b=FaRBMXmpO/xCcJtUQPZ1HvnJkzOmiQdoBSaOOOqZ9Wh209otLdmFkMB40f18bbXF/eHYg5+QEZeLvmAfsOewksiBdsoBNS9dlXMwSKXuBkQyZ0zCMnTHaf9qLz87oeRGFLuilNHZlUuc0UulRgSSAf0mSvaWOvQNz3vyhfcdnqQ=", "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=intel.com;\n spf=pass smtp.mailfrom=intel.com;\n dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com\n header.b=P2skoy1V; arc=none smtp.client-ip=198.175.65.15", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1776418162; x=1807954162;\n h=from:to:cc:subject:date:message-id:mime-version:\n content-transfer-encoding;\n bh=f7SLMYJoEHgSW/CGZ7RB6uXd2lxRreqr5d2o/92XbyY=;\n b=P2skoy1VAv2yMLH02Ihs59rKZ//MBAcknQwPqdSfl/TCbx3O7e3vX/CJ\n 7+8HVNjhDNlBmWHMnEdO/o28Sg+UaORpJO7fDuOUIB/IYUPa/YzMUtaxD\n sCzL6Oent+qv1GAqmGR/UfErHkFQ/WfqoCqtwgv177an2rtGFvSQWmLlB\n iVHUIlYmYXhqBDWHFGtFkjN5peqxOZPyBrCVPDjLFBv3AdsDOKEpX8BcI\n JoyM1KZJnXUxTDtWrGpOYpxLm6W3crfqQOKUV2gx3leC0AZyZeK8NuVLe\n VNUb9io4pDkiPFUEQnlp5LtY4tNyFu/tCd8LomVSw0QM11TERkJh7+lH4\n Q==;", "X-CSE-ConnectionGUID": [ "dY2A4MGKTRm0NOzHHTlspA==", "LO2pJL6aQDGFq4fZSXhhFw==" ], "X-CSE-MsgGUID": [ "lS9T6M7KRdmmFyokK/vWjA==", "Fnxq7XWzS6SJOksyZgT0wA==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6800,10657,11761\"; a=\"81029392\"", "E=Sophos;i=\"6.23,184,1770624000\";\n d=\"scan'208\";a=\"81029392\"", "E=Sophos;i=\"6.23,184,1770624000\";\n d=\"scan'208\";a=\"230870035\"" ], "X-ExtLoop1": "1", "From": "Zhenzhong Duan <zhenzhong.duan@intel.com>", "To": "linux-pci@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org", "Cc": "bhelgaas@google.com,\n\tdakr@kernel.org,\n\talex@shazbot.org,\n\thanguidong02@gmail.com,\n\tZhenzhong Duan <zhenzhong.duan@intel.com>", "Subject": "[PATCH] PCI: Initialize spinlock in new_id_store()", "Date": "Fri, 17 Apr 2026 05:29:08 -0400", "Message-ID": "<20260417092909.226412-1-zhenzhong.duan@intel.com>", "X-Mailer": "git-send-email 2.47.3", "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": "new_id_store() creates a dummy pci_dev structure but doesn't initialize\ndriver_override.lock in device structure. The lock is taken by\ndevice_match_driver_override() during PCI ID existence checking, then\nbelow lock corruption is reported if spinlock debug is enabled.\n\n BUG: spinlock bad magic on CPU#74, vfio_pci.sh/4575\n lock: 0xff1100018fd3e158, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0\n Call Trace:\n <TASK>\n dump_stack_lvl+0x51/0x80\n do_raw_spin_lock+0x64/0xc0\n pci_match_device+0x22/0x180\n new_id_store+0x184/0x1e0\n kernfs_fop_write_iter+0x13a/0x1e0\n vfs_write+0x31b/0x440\n ksys_write+0x67/0xe0\n do_syscall_64+0xa5/0x12c0\n entry_SYSCALL_64_after_hwframe+0x76/0x7e\n\nThe call trace is harmless as the whole driver_override structure is\ninitialized to zero.\n\nFixes: 10a4206a2401 (\"PCI: use generic driver_override infrastructure\")\nSigned-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>\n---\n drivers/pci/pci-driver.c | 3 +++\n 1 file changed, 3 insertions(+)", "diff": "diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c\nindex dd9075403987..9c3d4606721a 100644\n--- a/drivers/pci/pci-driver.c\n+++ b/drivers/pci/pci-driver.c\n@@ -213,6 +213,9 @@ static ssize_t new_id_store(struct device_driver *driver, const char *buf,\n \t\tpdev->subsystem_device = subdevice;\n \t\tpdev->class = class;\n \n+\t\t/* Initialize driver_override.lock as device_match_driver_override() takes it. */\n+\t\tspin_lock_init(&pdev->dev.driver_override.lock);\n+\n \t\tif (pci_match_device(pdrv, pdev))\n \t\t\tretval = -EEXIST;\n \n", "prefixes": [] }