OrangePi_CM5/drivers/misc/ocxl
Hangyu Hua ee89d8dee5 misc: ocxl: fix possible double free in ocxl_file_register_afu
[ Upstream commit 950cf957fe34d40d63dfa3bf3968210430b6491e ]

info_release() will be called in device_unregister() when info->dev's
reference count is 0. So there is no need to call ocxl_afu_put() and
kfree() again.

Fix this by adding free_minor() and return to err_unregister error path.

Fixes: 75ca758adb ("ocxl: Create a clear delineation between ocxl backend & frontend")
Signed-off-by: Hangyu Hua <hbh25y@gmail.com>
Acked-by: Frederic Barrat <fbarrat@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220418085758.38145-1-hbh25y@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-09 10:21:14 +02:00
..
Kconfig powerpc updates for 5.10 2020-10-16 12:21:15 -07:00
Makefile ocxl: Provide global MMIO accessors for external drivers 2019-05-03 02:55:02 +10:00
afu_irq.c ocxl: Don't return trigger page when allocating an interrupt 2020-08-25 01:31:31 +10:00
config.c ocxl: Address kernel doc errors & warnings 2020-07-29 23:47:52 +10:00
context.c ocxl: Fix misleading comment 2020-05-20 23:39:57 +10:00
core.c ocxl: simplify the return expression of free_function_dev() 2020-10-02 11:35:46 +02:00
file.c misc: ocxl: fix possible double free in ocxl_file_register_afu 2022-06-09 10:21:14 +02:00
link.c ocxl: Don't return trigger page when allocating an interrupt 2020-08-25 01:31:31 +10:00
main.c powerpc/64s/radix: introduce options to disable use of the tlbie instruction 2019-09-05 14:22:41 +10:00
mmio.c ocxl: Provide global MMIO accessors for external drivers 2019-05-03 02:55:02 +10:00
ocxl_internal.h ocxl: Address kernel doc errors & warnings 2020-07-29 23:47:52 +10:00
pasid.c
pci.c ocxl: Make ocxl_remove() static 2019-05-28 12:08:11 +10:00
sysfs.c ocxl: control via sysfs whether the FPGA is reloaded on a link reset 2020-07-15 11:07:19 +10:00
trace.c ocxl: Add trace points 2018-01-24 11:42:59 +11:00
trace.h ocxl: Use the correct style for SPDX License Identifier 2019-10-10 15:34:40 +02:00