Skip to content

firmware_loader: Fix shutdown ordering and reference counting

Dan Williams lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3firmware_loader: Stop pinning modules on registrationdrivers/base/firmware_loader/sysfs_upload.c+14 -170 replies
2/3firmware_loader: Stop pinning parent device per workqueue invocationdrivers/base/firmware_loader/sysfs_upload.c+2 -60 replies
3/3treewide: firmware_loader: Drop the unused @module argumentDocumentation/driver-api/firmware/fw_upload.rst drivers/base/firmware_loader/sysfs_upload.c drivers/cxl/core/memdev.c +7 more+22 -251 reply

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchChao GaoConor Dooley
1/3T-b
2/3
3/3A-b

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

Read the v1 thread

Cover letter [PATCH 0/3] firmware_loader: Fix shutdown ordering and reference counting

Chao Gao raised a module reference circular dependency report resulting from *correct* usage of the firmware_upload_register() API [1]. The module reference count is not necessary nor sufficient for protecting against racing unregister against in-flight requests. After that is fixed, a couple more cleanups fall out.

[1]: https://sashiko.dev/#/patchset/20260326084448.29947-1-chao.gao%40intel.com?patch=10705

Dan Williams (3):
firmware_loader: Stop pinning modules on registration
firmware_loader: Stop pinning parent device per workqueue invocation
treewide: firmware_loader: Drop the unused @module argument

 .../driver-api/firmware/fw_upload.rst         |  2 +-
 include/linux/firmware.h                      | 15 +++---
 drivers/base/firmware_loader/sysfs_upload.c   | 48 ++++++++-----------
 drivers/cxl/core/memdev.c                     |  4 +-
 drivers/firmware/microchip/mpfs-auto-update.c |  2 +-
 drivers/fpga/intel-m10-bmc-sec-update.c       |  4 +-
 drivers/greybus/gb-beagleplay.c               |  2 +-
 drivers/media/i2c/thp7312.c                   |  2 +-
 drivers/net/pse-pd/pd692x0.c                  |  4 +-
 lib/test_firmware.c                           |  3 +-
 10 files changed, 38 insertions(+), 48 deletions(-)

base-commit: f338e77383789c0cae23ca3d48adcc5e9e137e3c

Signature · 1 line
2.53.0