* [GIT PULL] rust-i2c-fixes for 7.1-rc7
@ 2026-06-06 17:39 Igor Korotin
2026-06-08 7:51 ` Wolfram Sang
0 siblings, 1 reply; 2+ messages in thread
From: Igor Korotin @ 2026-06-06 17:39 UTC (permalink / raw)
To: Wolfram Sang; +Cc: linux-i2c, linux-kernel
The following changes since commit e43ffb69e0438cddd72aaa30898b4dc446f664f8:
Linux 7.1-rc6 (2026-05-31 15:14:24 -0700)
are available in the Git repository at:
https://github.com/ikrtn/linux.git tags/rust-i2c-7.1-rc7
for you to fetch changes up to 4eb422482ca5d924d7212ad2ca1cb7ea6f5b524d:
rust: i2c: fix I2cAdapter refcounts double increment (2026-06-06
15:19:27 +0100)
----------------------------------------------------------------
rust: i2c: fix I2cAdapter refcount double increment
A single bugfix for the Rust I2C abstractions, targeting 7.1.
`I2cAdapter::get` calls `i2c_get_adapter()` which returns a pointer with
an already-incremented refcount. The code then converts the raw pointer to
an `ARef` via `.into()`, which calls `inc_ref()` again through the
`From<&T> for ARef<T>` impl — resulting in a leaked device and module
reference on every call.
The fix uses `ARef::from_raw()` instead, which takes ownership of the
existing refcount without incrementing it.
Signed-off-by: Igor Korotin <igor.korotin@linux.dev>
----------------------------------------------------------------
Nicolás Antinori (1):
rust: i2c: fix I2cAdapter refcounts double increment
rust/kernel/i2c.rs | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [GIT PULL] rust-i2c-fixes for 7.1-rc7
2026-06-06 17:39 [GIT PULL] rust-i2c-fixes for 7.1-rc7 Igor Korotin
@ 2026-06-08 7:51 ` Wolfram Sang
0 siblings, 0 replies; 2+ messages in thread
From: Wolfram Sang @ 2026-06-08 7:51 UTC (permalink / raw)
To: Igor Korotin; +Cc: Wolfram Sang, linux-i2c, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 802 bytes --]
On Sat, Jun 06, 2026 at 06:39:19PM +0100, Igor Korotin wrote:
> The following changes since commit e43ffb69e0438cddd72aaa30898b4dc446f664f8:
>
> Linux 7.1-rc6 (2026-05-31 15:14:24 -0700)
>
> are available in the Git repository at:
>
> https://github.com/ikrtn/linux.git tags/rust-i2c-7.1-rc7
>
> for you to fetch changes up to 4eb422482ca5d924d7212ad2ca1cb7ea6f5b524d:
>
> rust: i2c: fix I2cAdapter refcounts double increment (2026-06-06 15:19:27
> +0100)
Thanks, pulled. I was away over the weekend, so it couldn't make it into
rc7. But I will send it out later this week for 7.1 surely.
Please be already aware that from 7.2 on, you will need send pull
requests to Andi who takes over the I2C subsystem. I will write a
seperate mail about the handover later today.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-06-08 7:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-06 17:39 [GIT PULL] rust-i2c-fixes for 7.1-rc7 Igor Korotin
2026-06-08 7:51 ` Wolfram Sang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox