| Message ID | 20260827-i2c-dma-channel-leak-v1-0-271d4adc03a0@cherr.cc |
|---|---|
| Headers | show
Return-Path: <linux-i2c+bounces-20257-incoming=patchwork.ozlabs.org@vger.kernel.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=cherr.cc header.i=@cherr.cc header.a=rsa-sha256 header.s=feishu2604220257 header.b=V00chBgz; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2600:3c0a:e001:db::12fc:5321; helo=sea.lore.kernel.org; envelope-from=linux-i2c+bounces-20257-incoming=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from sea.lore.kernel.org (sea.lore.kernel.org [IPv6:2600:3c0a:e001:db::12fc:5321]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hW5QS3Cbgz1xtd for <incoming@patchwork.ozlabs.org>; Fri, 28 Aug 2026 01:43:28 +1000 (AEST) Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id 798AE30C1D32 for <incoming@patchwork.ozlabs.org>; Thu, 27 Aug 2026 15:43:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A303248382C; Thu, 27 Aug 2026 15:43:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cherr.cc header.i=@cherr.cc header.b="V00chBgz" X-Original-To: linux-i2c@vger.kernel.org Received: from sg-2-3.ptr.blmpb.com (sg-2-3.ptr.blmpb.com [71.18.227.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4F1ED3C3F48 for <linux-i2c@vger.kernel.org>; Thu, 27 Aug 2026 15:43:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=71.18.227.3 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787845400; cv=none; b=nWT3RarQA97LroWE6xhsT/xCQ4OkcfFJfMpDmJn4k4gVj9CYxhvFgNirO6ZQZ17DxniEd81VLYLYK9cgLcn+uRsM4eoMKQoMo6tuye/rcsfySjkdKEsS4J0bP1+re1DtpORQlgeLCl1TJo4KBJ0aWvSDvFdxSzBeA6Am2WXOoac= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787845400; c=relaxed/simple; bh=/oqgHYDPvMDVagPO7AKnMT/fGfUZ6coiSZBJygQnBzM=; h=Date:Mime-Version:Subject:Content-Type:To:From:Cc:Message-Id; b=ISGpr28cIE/saFKdO0eAatyj5AAfCR1V/lzQi0nSaFyMWlQhg5GLNUFpG4zzaxujGwV5wc95zRvU+JPL9+EpUGMYPIpK45+yOhuWvwiIjkooXSoZAuDg7Psqeh9PzbcOvvtHdWZ2egld3/vm+yn4QJsmwI80RQonOd2x5A4pgbE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cherr.cc; spf=pass smtp.mailfrom=cherr.cc; dkim=pass (2048-bit key) header.d=cherr.cc header.i=@cherr.cc header.b=V00chBgz; arc=none smtp.client-ip=71.18.227.3 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cherr.cc Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cherr.cc DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=feishu2604220257; d=cherr.cc; t=1787845391; h=from:subject: mime-version:from:date:message-id:subject:to:cc:reply-to:content-type: mime-version:in-reply-to:message-id; bh=Bh0KpptlHo4EabAVwVEP+7z/2v5dfwz3z0l/dDVT/I0=; b=V00chBgzzYgCqNjsuHPKFjsaKDb0LkzBjsxut47JqxA7+5W4pM0BccR2F2R7vQes0TTFpB CqsGB8gZYtZG+s6NxpTU9ZmZgDVVrYWPC/nmikjbHWJdGVzsm8GmCSaQTPhUpQQ2wntGhb lC8z9JgzYZrDvEA/PA+1hqfz3syOhXPy19RLct8Go+Q+MGt1GTJVX5k1Z+2NSwciBV4wHB DyOUkyR6J2fz6xSV1BkC1cNjkQuxBMO2tJ6StH4Bu3/x9/vJkye70qdlRUjYsoOTS8zCCj GPBhaAbl57rJBKTSBN5cujFZ/cDy16J+ritY4XpZDlhHLIIE+TjR3THmtvlw1A== Date: Thu, 27 Aug 2026 23:43:00 +0800 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 X-Change-Id: 20260827-i2c-dma-channel-leak-b58522243736 Subject: [PATCH 0/3] i2c: fix DMA channel leaks on probe error and remove Content-Type: text/plain; charset=UTF-8 Received: from [192.168.9.107] ([111.42.148.163]) by smtp.feishu.cn with ESMTPS; Thu, 27 Aug 2026 23:43:09 +0800 Content-Transfer-Encoding: 7bit To: "Codrin Ciubotariu" <codrin.ciubotariu@microchip.com>, "Andi Shyti" <andi.shyti@kernel.org>, "Nicolas Ferre" <nicolas.ferre@microchip.com>, "Alexandre Belloni" <alexandre.belloni@bootlin.com>, "Claudiu Beznea" <claudiu.beznea@tuxon.dev>, "Wolfram Sang" <wsa@kernel.org>, "Ludovic Desroches" <ludovic.desroches@atmel.com>, "Oleksij Rempel" <o.rempel@pengutronix.de>, "Pengutronix Kernel Team" <kernel@pengutronix.de>, "Frank Li" <Frank.Li@nxp.com>, "Sascha Hauer" <s.hauer@pengutronix.de>, "Fabio Estevam" <festevam@gmail.com>, "Yao Yuan" <yao.yuan@freescale.com>, "Mukesh Kumar Savaliya" <mukesh.savaliya@oss.qualcomm.com>, "Viken Dadhaniya" <viken.dadhaniya@oss.qualcomm.com>, "Bjorn Andersson" <andersson@kernel.org>, "Vinod Koul" <vkoul@kernel.org>, "Konrad Dybcio" <konrad.dybcio@oss.qualcomm.com>, "Praveen Talari" <praveen.talari@oss.qualcomm.com> From: "Shengzhuo Wei" <me@cherr.cc> X-Original-From: Shengzhuo Wei <me@cherr.cc> X-Lms-Return-Path: <lba+26a905b0e+0576c5+vger.kernel.org+me@cherr.cc> X-B4-Tracking: v=1; b=H4sIAAVbkGoC/yXMQQ6CMBCF4auQWTMJTi0Qr0JctGXUAayko8ak4 e4WXX55eX8G5SSscKoyJH6LyiMWHOoKws3FK6OMxUANtU1PHQoFHO8O9zXyggu7Gb3tLREdTWd aKNc18UU+v+xw/ltffuLw3FuwbV9sRvTUeAAAAA== Cc: <linux-i2c@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <linux-kernel@vger.kernel.org>, <imx@lists.linux.dev>, <linux-arm-msm@vger.kernel.org>, <stable@vger.kernel.org>, "Shengzhuo Wei" <me@cherr.cc> Message-Id: <20260827-i2c-dma-channel-leak-v1-0-271d4adc03a0@cherr.cc> X-Mailer: b4 0.16.0 |
| Series |
i2c: fix DMA channel leaks on probe error and remove
|
expand
|
Hi Shengzhuo, > Shengzhuo Wei (3): > i2c: at91: release DMA channels on remove and probe error > i2c: imx: release DMA channels on probe error > i2c: qcom-geni: release DMA channels on probe error pushed to i2c/i2c-fixes. Thanks, Andi
Three I2C bus drivers request exclusive DMA channels before registering their adapter, but none of them releases the channels on the probe error path (the remove callback is not invoked after a failed probe), and the at91 driver never releases them on remove either. Same class as 777979e62711 ("i2c: mxs: fix DMA channel leak on probe error"), which used devm_dma_request_chan() for mxs; here the drivers own non-devm state, so the fixes release the channels explicitly on the error paths. The three drivers are otherwise unrelated; the series exists only because the bug shape and the fix shape are identical. --- Shengzhuo Wei (3): i2c: at91: release DMA channels on remove and probe error i2c: imx: release DMA channels on probe error i2c: qcom-geni: release DMA channels on probe error drivers/i2c/busses/i2c-at91-core.c | 3 +++ drivers/i2c/busses/i2c-at91-master.c | 12 +++++++++++- drivers/i2c/busses/i2c-at91.h | 1 + drivers/i2c/busses/i2c-imx.c | 2 ++ drivers/i2c/busses/i2c-qcom-geni.c | 4 +++- 5 files changed, 20 insertions(+), 2 deletions(-) --- base-commit: 45c13f3f9e3bb15fd89ff2864c6f627a3b4b4229 change-id: 20260827-i2c-dma-channel-leak-b58522243736 Best regards, -- Shengzhuo Wei <me@cherr.cc>