Skip to content

RFC fpga: improve protection against low-level control module unloading

Marco Pagani linux-doc linux-fpga lkml 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 RFC Latest1 patch 15 repliesIn review
  2. v4 RFC1 patch 5 repliesSuperseded
  3. v3 RFC2 patches 11 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v2 RFC2 patches6 repliesSuperseded
v1 RFC2 patches0 repliesSuperseded

Changes in v5 from the cover letter

- Updated the documentation
- Removed kernel-doc comments for helper macros v4:
- Use helper macros to set the owner module v3:
- Improved locking

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1fpga: add an owner and use it to take the low-level module's refcountDocumentation/driver-api/fpga/fpga-mgr.rst drivers/fpga/fpga-mgr.c include/linux/fpga/fpga-mgr.h+102 -5315 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v5 yet.

Read the v5 thread

Cover letter [RFC PATCH v5 0/1] fpga: improve protection against low-level control module unloading

This RFC proposes a solution to keep protecting the fpga manager against the unloading of the low-level control modules while addressing the limitations of the current implementation. Currently, the code assumes that the low-level module registers a driver for the parent device that is later used to take the module's refcount. This proposal removes this limitation by adding a module owner field to the fpga_manager struct that can be set while registering the manager.

For more context, please refer to these threads:
https://lore.kernel.org/linux-fpga/ZS6hhlvjUcqyv8zL@yilunxu-OptiPlex-7050
https://lore.kernel.org/linux-fpga/ZT9qENE9fE3Z0KCW@yilunxu-OptiPlex-7050

v5:
- Updated the documentation
- Removed kernel-doc comments for helper macros v4:
- Use helper macros to set the owner module v3:
- Improved locking
v2:
- Fixed protection against races during module removal

Marco Pagani (1):
fpga: add an owner and use it to take the low-level module's refcount

 Documentation/driver-api/fpga/fpga-mgr.rst | 34 ++++----
 drivers/fpga/fpga-mgr.c                    | 93 ++++++++++++++--------
 include/linux/fpga/fpga-mgr.h              | 28 +++++--
 3 files changed, 102 insertions(+), 53 deletions(-)

base-commit: c849ecb2ae8413f86c84627cb0af06dffce4e215

Signature · 1 line
2.43.0