[PATCH v3 00/10] i2c: core: adapter registration fixes

Johan Hovold posted 10 patches 1 month ago
drivers/i2c/i2c-core-base.c | 173 +++++++++++++++++++++---------------
1 file changed, 100 insertions(+), 73 deletions(-)
[PATCH v3 00/10] i2c: core: adapter registration fixes
Posted by Johan Hovold 1 month ago
This series fixes a number of bugs related to adapter registration found
through inspection (when looking into addressing i2c lifetime issues).

Included are also two related cleanups.

Johan


Changes in v3:
 - split NULL-deref fix from probe loop fix (2-3/10)
 - add missing adapter name error handling (5/10)
 - replace adapter in IDR also on registration failures (8/10)

Changes in v2:
 - fix irq domain leak (new, flagged by Sashiko when reviewing v1)
 - add adapter to IDR before registration as needed by i2c-dev
 - honour devicetree alias also when using i2c_add_numbered_adapter()


Johan Hovold (10):
  i2c: core: fix irq domain leak on adapter registration failure
  i2c: core: fix hang on adapter registration failure
  i2c: core: fix NULL-deref on adapter registration failure
  i2c: core: fix adapter probe deferral loop
  i2c: core: fix adapter debugfs creation
  i2c: core: disable runtime PM on adapter registration failure
  i2c: core: fix adapter registration race
  i2c: core: fix adapter deregistration race
  i2c: core: clean up bus id allocation
  i2c: core: clean up adapter registration error label

 drivers/i2c/i2c-core-base.c | 173 +++++++++++++++++++++---------------
 1 file changed, 100 insertions(+), 73 deletions(-)

-- 
2.53.0
Re: [PATCH v3 00/10] i2c: core: adapter registration fixes
Posted by Wolfram Sang 1 month ago
On Mon, May 11, 2026 at 04:37:05PM +0200, Johan Hovold wrote:
> This series fixes a number of bugs related to adapter registration found
> through inspection (when looking into addressing i2c lifetime issues).

I intend to review the series. I wonder if it makes sense to wait until
you don't see any valuable input from Sashiko anymore. Otherwise a
reworked series X+1 will be sent while I am still looking at series X.

Re: [PATCH v3 00/10] i2c: core: adapter registration fixes
Posted by Johan Hovold 1 month ago
On Mon, May 11, 2026 at 06:35:16PM +0200, Wolfram Sang wrote:
> On Mon, May 11, 2026 at 04:37:05PM +0200, Johan Hovold wrote:
> > This series fixes a number of bugs related to adapter registration found
> > through inspection (when looking into addressing i2c lifetime issues).
> 
> I intend to review the series. I wonder if it makes sense to wait until
> you don't see any valuable input from Sashiko anymore. Otherwise a
> reworked series X+1 will be sent while I am still looking at series X.

You can always wait a few hours until the Sashiko output is available if
you're worried about that, but I don't expect there to be any further
revisions of this series.

Johan