From: Marco Pagani <marpagan@redhat.com>
To: Moritz Fischer <mdf@kernel.org>, Wu Hao <hao.wu@intel.com>,
Xu Yilun <yilun.xu@intel.com>, Tom Rix <trix@redhat.com>,
Jonathan Corbet <corbet@lwn.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Alan Tull <atull@opensource.altera.com>
Cc: Marco Pagani <marpagan@redhat.com>,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
linux-fpga@vger.kernel.org
Subject: [RFC PATCH v5 0/1] fpga: improve protection against low-level control module unloading
Date: Thu, 11 Jan 2024 17:02:41 +0100 [thread overview]
Message-ID: <20240111160242.149265-1-marpagan@redhat.com> (raw)
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
--
2.43.0
next reply other threads:[~2024-01-11 16:03 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-11 16:02 Marco Pagani [this message]
2024-01-11 16:02 ` [RFC PATCH v5 1/1] fpga: add an owner and use it to take the low-level module's refcount Marco Pagani
2024-01-30 4:31 ` Xu Yilun
2024-02-02 17:44 ` Marco Pagani
2024-02-04 5:15 ` Xu Yilun
2024-02-05 17:47 ` Marco Pagani
2024-02-18 10:05 ` Xu Yilun
2024-02-20 11:11 ` Marco Pagani
2024-02-21 14:37 ` Xu Yilun
2024-02-27 11:49 ` Marco Pagani
2024-02-28 7:10 ` Xu Yilun
2024-02-29 10:37 ` Marco Pagani
2024-03-01 15:12 ` Xu Yilun
2024-03-01 16:29 ` Marco Pagani
2024-03-04 11:51 ` Marco Pagani
2024-03-04 13:49 ` Xu Yilun
2024-03-04 22:26 ` Marco Pagani
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240111160242.149265-1-marpagan@redhat.com \
--to=marpagan@redhat.com \
--cc=atull@opensource.altera.com \
--cc=corbet@lwn.net \
--cc=gregkh@linuxfoundation.org \
--cc=hao.wu@intel.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-fpga@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mdf@kernel.org \
--cc=trix@redhat.com \
--cc=yilun.xu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).