Skip to content

i2c: core: adapter registration fixes

Johan Hovold linux-i2c lkml stable 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest10 patches 12 repliesIn review
  2. v29 patches 0 repliesSuperseded
  3. v18 patches 2 repliesSuperseded

Changes in v3 from the cover letter

- 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)

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10i2c: core: fix irq domain leak on adapter registration failuredrivers/i2c/i2c-core-base.c+3 -11 reply
2/10i2c: core: fix hang on adapter registration failuredrivers/i2c/i2c-core-base.c+29 -201 reply
3/10i2c: core: fix NULL-deref on adapter registration failuredrivers/i2c/i2c-core-base.c+5 -41 reply
4/10i2c: core: fix adapter probe deferral loopdrivers/i2c/i2c-core-base.c+4 -41 reply
5/10i2c: core: fix adapter debugfs creationdrivers/i2c/i2c-core-base.c+10 -61 reply
6/10i2c: core: disable runtime PM on adapter registration failuredrivers/i2c/i2c-core-base.c+1 -01 reply
7/10i2c: core: fix adapter registration racedrivers/i2c/i2c-core-base.c+6 -21 reply
8/10i2c: core: fix adapter deregistration racedrivers/i2c/i2c-core-base.c+7 -21 reply
9/10i2c: core: clean up bus id allocationdrivers/i2c/i2c-core-base.c+45 -441 reply
10/10i2c: core: clean up adapter registration error labeldrivers/i2c/i2c-core-base.c+2 -21 reply

Reviews trailers per patch

All 10 patches have a Reviewed-by or Acked-by.

PatchWolfram Sang
1/10R-b
2/10R-b
3/10R-b
4/10R-b
5/10R-b
6/10R-b
7/10R-b
8/10R-b
9/10R-b
10/10R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

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

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(-)
Signature · 1 line
2.53.0