Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/2233021/?format=api
{ "id": 2233021, "url": "http://patchwork.ozlabs.org/api/1.2/patches/2233021/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-i2c/patch/20260505142547.795054-7-johan@kernel.org/", "project": { "id": 35, "url": "http://patchwork.ozlabs.org/api/1.2/projects/35/?format=api", "name": "Linux I2C development", "link_name": "linux-i2c", "list_id": "linux-i2c.vger.kernel.org", "list_email": "linux-i2c@vger.kernel.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260505142547.795054-7-johan@kernel.org>", "list_archive_url": null, "date": "2026-05-05T14:25:45", "name": "[6/8] i2c: core: fix adapter deregistration race", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "4416c64f8d79c7b1d3bb543d50e32f7568feceaf", "submitter": { "id": 64666, "url": "http://patchwork.ozlabs.org/api/1.2/people/64666/?format=api", "name": "Johan Hovold", "email": "johan@kernel.org" }, "delegate": { "id": 9049, "url": "http://patchwork.ozlabs.org/api/1.2/users/9049/?format=api", "username": "wsa", "first_name": "Wolfram", "last_name": "Sang", "email": "wolfram@the-dreams.de" }, "mbox": "http://patchwork.ozlabs.org/project/linux-i2c/patch/20260505142547.795054-7-johan@kernel.org/mbox/", "series": [ { "id": 502847, "url": "http://patchwork.ozlabs.org/api/1.2/series/502847/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-i2c/list/?series=502847", "date": "2026-05-05T14:25:43", "name": "i2c: core: adapter registration fixes", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/502847/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2233021/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2233021/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <linux-i2c+bounces-17255-incoming=patchwork.ozlabs.org@vger.kernel.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "linux-i2c@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=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=TiGfcIHU;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c04:e001:36c::12fc:5321; helo=tor.lore.kernel.org;\n envelope-from=linux-i2c+bounces-17255-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)", "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=\"TiGfcIHU\"", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=10.30.226.201" ], "Received": [ "from tor.lore.kernel.org (tor.lore.kernel.org\n [IPv6:2600:3c04:e001:36c::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 4g91HS0kJCz1yJx\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 06 May 2026 00:34:28 +1000 (AEST)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id D1CC2308C953\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 5 May 2026 14:28:42 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 22E2448095A;\n\tTue, 5 May 2026 14:28:35 +0000 (UTC)", "from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org\n [10.30.226.201])\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 A602248032C;\n\tTue, 5 May 2026 14:28:34 +0000 (UTC)", "by smtp.kernel.org (Postfix) with ESMTPSA id 5DCFEC2BCC7;\n\tTue, 5 May 2026 14:28:34 +0000 (UTC)", "from johan by xi.lan with local (Exim 4.98.2)\n\t(envelope-from <johan@kernel.org>)\n\tid 1wKGlE-00000003Kt2-0bzp;\n\tTue, 05 May 2026 16:28:32 +0200" ], "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1777991314; cv=none;\n b=ZHqhslCfGelAM7YE7AnN4/y6/WChkBVpSVqDG7aRggXNoj67JGgwxI9ujQ5BFaW+PNvfRY3XhQyLJB/LwV5IgdeHzyZWT/r9ayULgiTS2W75MGvFIAH+IYwDtwoSUWZtm1vghKMe4TJe7PWCHh6gnSxT4ndFvAjpDR+UaiRhUUM=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1777991314; c=relaxed/simple;\n\tbh=tGAqDrEa0NZzzkYgDzVwNuk1zf8s33MQTeXZP9FSPmE=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=keWev+0P4VQ2DpONs/2slDERlJE4RByeislp80T358J9hcBxEtx8Rzq7sNh43GoBnwhAnRSCGG9Ik1wJg4pM09scGX6KcvBCZMKUX+lh4PcxIQiWWMikf2Kwr3MTGxNjkxHla3QSEBB0e/dk7v3eWSxQFADuliR+iHFSj3iZRSk=", "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=TiGfcIHU; arc=none smtp.client-ip=10.30.226.201", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n\ts=k20201202; t=1777991314;\n\tbh=tGAqDrEa0NZzzkYgDzVwNuk1zf8s33MQTeXZP9FSPmE=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=TiGfcIHUWKZtcFnUlrQzOissJbMWXxwQ66jOSOJb8EZpVN5UvyxINGTJniIP16d4v\n\t Wp4A07YYWbZfGhOkNUB0JMnvXWMGhBSkX/LXXNKz3zmWiWbZlt0fVrTtjHtVQPi3A2\n\t Dqw67Gq7tz9fX3Y6DwEkx8JhsQ96sbzEr6C5R+ADbkr8zPpcvkVjqey9h97zAPCxWl\n\t 5G32Om/KEk5xBtm7Jlic63Zr0Jh0bUpoCYb7Ke8soyj0ZwR21kx3Qws7zXJkMTHTXR\n\t 6hF5jGpMzDcDORuFcPpstKbEtLiw9DNguUzNf8JDES2nLeWdfxQ4dM6tmg9rvHt3iE\n\t A1+iKJG3wGX/A==", "From": "Johan Hovold <johan@kernel.org>", "To": "Wolfram Sang <wsa+renesas@sang-engineering.com>", "Cc": "Andi Shyti <andi.shyti@kernel.org>,\n\tlinux-i2c@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org,\n\tJohan Hovold <johan@kernel.org>,\n\tstable@vger.kernel.org,\n\tJean Delvare <khali@linux-fr.org>", "Subject": "[PATCH 6/8] i2c: core: fix adapter deregistration race", "Date": "Tue, 5 May 2026 16:25:45 +0200", "Message-ID": "<20260505142547.795054-7-johan@kernel.org>", "X-Mailer": "git-send-email 2.53.0", "In-Reply-To": "<20260505142547.795054-1-johan@kernel.org>", "References": "<20260505142547.795054-1-johan@kernel.org>", "Precedence": "bulk", "X-Mailing-List": "linux-i2c@vger.kernel.org", "List-Id": "<linux-i2c.vger.kernel.org>", "List-Subscribe": "<mailto:linux-i2c+subscribe@vger.kernel.org>", "List-Unsubscribe": "<mailto:linux-i2c+unsubscribe@vger.kernel.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit" }, "content": "Adapters can be looked up by their id using i2c_get_adapter() which\ntakes a reference to the embedded struct device.\n\nRemove the adapter from the IDR before tearing it down during\nderegistration to make sure its resources are not accessed after having\nbeen freed (e.g. the device name).\n\nFixes: 35fc37f81881 (\"i2c: Limit core locking to the necessary sections\")\nCc: stable@vger.kernel.org\t# 2.6.31\nCc: Jean Delvare <khali@linux-fr.org>\nSigned-off-by: Johan Hovold <johan@kernel.org>\n---\n drivers/i2c/i2c-core-base.c | 2 ++\n 1 file changed, 2 insertions(+)", "diff": "diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c\nindex be909d6bc776..6209c5587e99 100644\n--- a/drivers/i2c/i2c-core-base.c\n+++ b/drivers/i2c/i2c-core-base.c\n@@ -1799,6 +1799,8 @@ void i2c_del_adapter(struct i2c_adapter *adap)\n \t/* First make sure that this adapter was ever added */\n \tmutex_lock(&core_lock);\n \tfound = idr_find(&i2c_adapter_idr, adap->nr);\n+\tif (found == adap)\n+\t\tidr_replace(&i2c_adapter_idr, NULL, adap->nr);\n \tmutex_unlock(&core_lock);\n \tif (found != adap) {\n \t\tpr_debug(\"attempting to delete unregistered adapter [%s]\\n\", adap->name);\n", "prefixes": [ "6/8" ] }