linux-fpga.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH v4 0/1] fpga: improve protection against low-level control module unloading
@ 2024-01-05 23:15 Marco Pagani
  2024-01-05 23:15 ` [RFC PATCH v4 1/1] fpga: add an owner and use it to take the low-level module's refcount Marco Pagani
  0 siblings, 1 reply; 7+ messages in thread
From: Marco Pagani @ 2024-01-05 23:15 UTC (permalink / raw)
  To: Moritz Fischer, Wu Hao, Xu Yilun, Tom Rix, Greg Kroah-Hartman
  Cc: Marco Pagani, linux-kernel, linux-fpga

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

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

 drivers/fpga/fpga-mgr.c       | 93 ++++++++++++++++++++++-------------
 include/linux/fpga/fpga-mgr.h | 80 +++++++++++++++++++++++++++---
 2 files changed, 134 insertions(+), 39 deletions(-)


base-commit: 610a9b8f49fbcf1100716370d3b5f6f884a2835a
-- 
2.43.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-01-11  6:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-05 23:15 [RFC PATCH v4 0/1] fpga: improve protection against low-level control module unloading Marco Pagani
2024-01-05 23:15 ` [RFC PATCH v4 1/1] fpga: add an owner and use it to take the low-level module's refcount Marco Pagani
2024-01-08  9:07   ` Xu Yilun
2024-01-08 17:24     ` Marco Pagani
2024-01-09  4:40       ` Xu Yilun
2024-01-09 11:53         ` Marco Pagani
2024-01-11  6:30           ` Xu Yilun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).