android_kernel_xiaomi_sm8450/Documentation
Marco Pagani 26e6e25d74 fpga: region: add owner module and take its refcount
[ Upstream commit b7c0e1ecee403a43abc89eb3e75672b01ff2ece9 ]

The current implementation of the fpga region assumes that the low-level
module registers a driver for the parent device and uses its owner pointer
to take the module's refcount. This approach is problematic since it can
lead to a null pointer dereference while attempting to get the region
during programming if the parent device does not have a driver.

To address this problem, add a module owner pointer to the fpga_region
struct and use it to take the module's refcount. Modify the functions for
registering a region to take an additional owner module parameter and
rename them to avoid conflicts. Use the old function names for helper
macros that automatically set the module that registers the region as the
owner. This ensures compatibility with existing low-level control modules
and reduces the chances of registering a region without setting the owner.

Also, update the documentation to keep it consistent with the new interface
for registering an fpga region.

Fixes: 0fa20cdfcc ("fpga: fpga-region: device tree control for FPGA")
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Suggested-by: Xu Yilun <yilun.xu@intel.com>
Reviewed-by: Russ Weight <russ.weight@linux.dev>
Signed-off-by: Marco Pagani <marpagan@redhat.com>
Acked-by: Xu Yilun <yilun.xu@intel.com>
Link: https://lore.kernel.org/r/20240419083601.77403-1-marpagan@redhat.com
Signed-off-by: Xu Yilun <yilun.xu@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-06-16 13:32:19 +02:00
..
ABI PM / devfreq: Fix buffer overflow in trans_stat_show 2024-05-02 16:23:44 +02:00
accounting psi: Fix uaf issue when psi trigger is destroyed while being polled 2022-02-05 12:37:55 +01:00
admin-guide x86/cpu: Enable STIBP on AMD if Automatic IBRS is enabled 2024-04-13 12:59:13 +02:00
arm ARM: 9012/1: move device tree mapping out of linear region 2021-05-19 10:13:18 +02:00
arm64 perf/smmuv3: Enable HiSilicon Erratum 162001900 quirk for HIP08/09 2023-09-23 11:01:05 +02:00
block block: introduce zone_write_granularity limit 2024-04-13 12:58:07 +02:00
bpf bpf: Migrate from patchwork.ozlabs.org to patchwork.kernel.org. 2020-10-11 22:05:47 +02:00
cdrom
core-api kernel.h: split out kstrtox() and simple_strtox() to a separate header 2023-06-21 15:45:35 +02:00
cpu-freq
crypto crypto: af_alg - add extra parameters for DRBG interface 2020-09-25 17:48:52 +10:00
dev-tools docs/scripts/gdb: add necessary make scripts_gdb step 2023-03-11 16:39:52 +01:00
devicetree ASoC: dt-bindings: rt5645: add cbj sleeve gpio property 2024-06-16 13:32:00 +02:00
doc-guide docs: kerneldoc.py: add support for kerneldoc -nosymbol 2020-10-15 07:49:38 +02:00
driver-api fpga: region: add owner module and take its refcount 2024-06-16 13:32:19 +02:00
fault-injection debugfs: fix error when writing negative value to atomic_t debugfs file 2023-01-14 10:15:19 +01:00
fb drm fixes (round two) for 5.10-rc1 2020-10-23 13:56:34 -07:00
features s390 updates for the 5.10 merge window 2020-10-16 12:36:38 -07:00
filesystems f2fs: add compress_mode mount option 2024-06-16 13:32:17 +02:00
firmware_class
firmware-guide Documentation: ACPI: EINJ: Fix obsolete example 2022-08-25 11:37:53 +02:00
fpga
gpu Revert "fbcon: Disable accelerated scrolling" 2022-02-08 18:30:40 +01:00
hid
hwmon hwmon: (lm90) Add basic support for TI TMP461 2021-12-29 12:25:59 +01:00
i2c Documentation: i2c: add testunit docs to index 2020-10-05 22:57:45 +02:00
ia64
ide
iio
infiniband
input Input: iforce - add support for Boeder Force Feedback Wheel 2022-09-20 12:38:32 +02:00
isdn
kbuild Documentation/Kbuild: Remove references to gcc-plugin.sh 2021-12-14 11:32:46 +01:00
kernel-hacking docs: futex: Fix kernel-doc references after code split-up preparation 2023-04-26 11:27:40 +02:00
leds docs: leds: index.rst: add a missing file 2020-11-02 13:45:37 +01:00
litmus-tests
livepatch
locking Documentation/locking/locktypes: Update migrate_disable() bits. 2021-12-14 11:32:42 +01:00
m68k
maintainer
mhi
mips dt: Remove booting-without-of.rst 2020-10-13 13:33:16 -05:00
misc-devices Documentation: remove mic/index from misc-devices/index.rst 2020-11-04 11:38:32 +01:00
netlabel
networking net: change accept_ra_min_rtr_lft to affect all RA lifetimes 2023-10-25 11:54:14 +02:00
nios2
nvdimm
openrisc
parisc
PCI Documentation: better locations for sysfs-pci, sysfs-tagging 2020-10-09 09:33:23 -06:00
pcmcia
power PCI/PM: Rename pci_dev.d3_delay to d3hot_delay 2020-09-29 14:21:50 -05:00
powerpc powerpc/doc: Fix htmldocs errors 2023-04-26 11:27:37 +02:00
process overflow: Implement size_t saturating arithmetic helpers 2023-11-20 11:06:44 +01:00
RCU Merge branch 'for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into core/rcu 2020-10-09 08:21:56 +02:00
riscv
s390
scheduler
scsi scsi: core: Fix the scsi_set_resid() documentation 2023-09-19 12:20:21 +02:00
security watch_queue: Drop references to /dev/watch_queue 2021-03-04 11:37:59 +01:00
sh dt: Remove booting-without-of.rst 2020-10-13 13:33:16 -05:00
sound ASoC: doc: Fix undefined SND_SOC_DAPM_NOPM argument 2024-02-23 08:42:10 +01:00
sparc
sphinx docs: kernel_include.py: Cope with docutils 0.21 2024-05-25 16:19:07 +02:00
sphinx-static
spi
staging
target tweewide: Fix most Shebang lines 2021-05-22 11:40:55 +02:00
timers
trace attr: use consistent sgid stripping checks 2023-03-22 13:30:08 +01:00
translations docs: futex: Fix kernel-doc references after code split-up preparation 2023-04-26 11:27:40 +02:00
usb
userspace-api Remove DECnet support from kernel 2023-06-21 15:45:38 +02:00
virt KVM: s390: disable migration mode when dirty tracking is disabled 2023-03-11 16:39:58 +01:00
vm arm: remove CONFIG_ARCH_HAS_HOLES_MEMORYMODEL 2022-05-15 20:00:09 +02:00
w1 docs: w1: w1_therm: Fix broken xref, mistakes, clarify text 2020-10-08 09:47:15 +02:00
watchdog
x86 x86/bugs: Use ALTERNATIVE() instead of mds_user_clear static key 2024-04-13 12:58:57 +02:00
xtensa xtensa: fix TLBTEMP area placement 2020-11-16 02:13:15 -08:00
.gitignore
asm-annotations.rst x86/entry: Emit a symbol for register restoring thunk 2021-02-03 23:28:40 +01:00
atomic_bitops.txt locking/atomic: Make test_and_*_bit() ordered on failure 2022-08-25 11:38:10 +02:00
atomic_t.txt
Changes
CodingStyle
conf.py docs/conf.py: Cope with removal of language=None in Sphinx 5.0.0 2022-06-09 10:21:28 +02:00
COPYING-logo
docutils.conf
dontdiff kbuild: generate Module.symvers only when vmlinux exists 2021-05-19 10:12:59 +02:00
index.rst
Kconfig docs: Kconfig/Makefile: add a check for broken ABI files 2020-10-30 13:08:07 +01:00
logo.gif
Makefile A small number of fixes, plus a build tweak to respect the desire for 2020-11-03 09:57:30 -08:00
memory-barriers.txt
SubmittingPatches
watch_queue.rst