Re: [PATCH] i2c: acpi: Fix adapter reference leak in i2c_acpi_new_device_by_fwnode()
From: Wentao Liang
Date: Fri Nov 06 2026 - 04:36:20 EST
Hi Mika,
I am very sorry for replying so late, seven weeks after your review.
You took the time to look at the patch and to ack it the same day, and I
left the thread hanging without a word. There is no good excuse for
that, and I apologize for the delay and for the extra work it caused.
> I don't think this is right. The issue existed already before the move.
You are right. 53f8f7c5cf14 only moved the existing ACPI support code
into a separate file, and I should have traced the history back instead
of stopping at the move. The leak was introduced by 605f8fc22442
("i2c: core: Add new i2c_acpi_new_device helper function"), which added
i2c_acpi_new_device() with the same pattern: the adapter is returned by
i2c_acpi_find_adapter_by_handle() with a reference taken by
bus_find_device(), and the function then returns
i2c_new_device(adapter, info) without dropping that reference. So the
correct tags are:
Fixes: 605f8fc22442 ("i2c: core: Add new i2c_acpi_new_device helper function")
Cc: <stable@xxxxxxxxxxxxxxx> # v4.12+
While reading up on the thread I also saw that the same fix has since
been submitted by Ma Ke and is now in mainline as a65917d0a22f with the
corrected tag, so there is nothing left for me to resend and I will not
add a duplicate v2 to the list.
This has been an important lesson for me. From now on I will go through
all remaining review comments one by one myself and reply in time, and I
will not send patches in batches that exceed what I can properly follow
up on.
Thank you for your review, for the ack and for your patience.
Best regards,
Wentao Liang