Skip to content

driver core: class: Fix bug and code improvements for class APIs

Zijun Hu cgroups linux-block linux-cxl lkml stable 6 versions – New

Get series with b4
b4 am [email protected] change-id 20241104-class_fix-f176bd9eba22

Versions newest first

  1. v6 Latest8 patches 0 repliesNew
  2. v58 patches 2 repliesSuperseded
  3. v48 patches 5 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v39 patches15 repliesSuperseded
v22 patches0 repliesSuperseded
v13 patches7 repliesSuperseded

Changes in v6 from the cover letter

- Remove dependencies since they have been merged into driver-core tree
- Link to v5: https://lore.kernel.org/r/[email protected]

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8driver core: class: Fix wild pointer dereferences in API class_dev_iter_next()drivers/base/class.c+8 -10 replies
2/8blk-cgroup: Fix class @block_class's subsystem refcount leakageblock/blk-cgroup.c+1 -00 replies
3/8driver core: Move true expression out of if condition in 3 device finding APIsdrivers/base/bus.c drivers/base/core.c drivers/base/driver.c+15 -60 replies
4/8driver core: Rename declaration parameter name for API device_find_child() clusterinclude/linux/device.h+3 -30 replies
5/8driver core: Correct parameter check for API device_for_each_child_reverse_from()drivers/base/core.c+1 -10 replies
6/8driver core: Correct API device_for_each_child_reverse_from() prototypedrivers/base/core.c drivers/cxl/core/hdm.c drivers/cxl/core/region.c +1 more+6 -60 replies
7/8driver core: Introduce device_iter_t for device iterating APIsdrivers/base/bus.c drivers/base/class.c drivers/base/core.c +5 more+17 -140 replies
8/8driver core: Move two simple APIs for finding child device to headerdrivers/base/core.c include/linux/device.h+29 -350 replies

Reviews trailers per patch

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

PatchJonathan CameronMichal KoutnýTejun HeoFan Ni
1/8R-b
2/8R-b A-b
3/8R-b R-b
4/8R-b R-b
5/8R-b
6/8R-b
7/8R-b
8/8R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v6 thread

Cover letter [PATCH v6 0/8] driver core: class: Fix bug and code improvements for class APIs

This patch series is to fix bugs and improve codes regarding various driver core device iterating APIs

---
Changes in v6:
- Remove dependencies since they have been merged into driver-core tree
- Link to v5: https://lore.kernel.org/r/[email protected]

Changes in v5:
- Add comments back and correct tile and commit messages for patch 8/8.
- Link to v4: https://lore.kernel.org/r/[email protected]

Changes in v4:
- Squich patches 3-5 into one based on Jonathan and Fan comments.
- Add one more patch
- Link to v3: https://lore.kernel.org/r/[email protected]

Changes in v3:
- Correct commit message, add fix tag, and correct pr_crit() message for 1st patch
- Add more patches regarding driver core device iterating APIs.
- Link to v2: https://lore.kernel.org/r/[email protected]

Changes in v2:
- Remove both fix and stable tag for patch 1/3
- drop patch 3/3
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Zijun Hu (8):
driver core: class: Fix wild pointer dereferences in API class_dev_iter_next()
blk-cgroup: Fix class @block_class's subsystem refcount leakage driver core: Move true expression out of if condition in 3 device finding APIs driver core: Rename declaration parameter name for API device_find_child() cluster driver core: Correct parameter check for API device_for_each_child_reverse_from() driver core: Correct API device_for_each_child_reverse_from() prototype driver core: Introduce device_iter_t for device iterating APIs driver core: Move two simple APIs for finding child device to header

 block/blk-cgroup.c            |  1 +
 drivers/base/bus.c            |  9 +++++---
 drivers/base/class.c          | 11 ++++++++--
 drivers/base/core.c           | 49 +++++++++----------------------------------
 drivers/base/driver.c         |  9 +++++---
 drivers/cxl/core/hdm.c        |  2 +-
 drivers/cxl/core/region.c     |  2 +-
 include/linux/device.h        | 46 +++++++++++++++++++++++++++++++---------
 include/linux/device/bus.h    |  7 +++++--
 include/linux/device/class.h  |  4 ++--
 include/linux/device/driver.h |  2 +-
 11 files changed, 78 insertions(+), 64 deletions(-)

---
base-commit: 7687c66c18c66d4ccd9949c6f641c0e7b5773483
change-id: 20241104-class_fix-f176bd9eba22

Best regards,

Signature · 1 line
Zijun Hu <[email protected]>