linux/drivers/rpmsg
Hangyu Hua d4c8bf5635 rpmsg: Fix possible refcount leak in rpmsg_register_device_override()
commit d7bd416d35 upstream.

rpmsg_register_device_override need to call put_device to free vch when
driver_set_override fails.

Fix this by adding a put_device() to the error path.

Fixes: bb17d110cb ("rpmsg: Fix calling device_lock() on non-initialized device")
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Hangyu Hua <hbh25y@gmail.com>
Link: https://lore.kernel.org/r/20220624024120.11576-1-hbh25y@gmail.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-11-08 17:26:44 +01:00
..
Kconfig rpmsg: Turn name service into a stand alone driver 2020-11-24 10:11:59 -06:00
Makefile rpmsg: Turn name service into a stand alone driver 2020-11-24 10:11:59 -06:00
mtk_rpmsg.c rpmsg: mtk_rpmsg: Fix circular locking dependency 2022-08-17 14:24:03 +02:00
qcom_glink_native.c rpmsg: glink: Release driver_override 2023-11-08 17:26:44 +01:00
qcom_glink_native.h
qcom_glink_rpm.c
qcom_glink_smem.c
qcom_glink_ssr.c rpmsg: glink: add include of header file 2021-01-05 22:22:40 -06:00
qcom_smd.c rpmsg: qcom: glink: replace strncpy() with strscpy_pad() 2022-10-12 09:53:28 +02:00
rpmsg_char.c rpmsg: char: Add mutex protection for rpmsg_eptdev_open() 2022-08-17 14:24:03 +02:00
rpmsg_core.c rpmsg: Fix possible refcount leak in rpmsg_register_device_override() 2023-11-08 17:26:44 +01:00
rpmsg_internal.h rpmsg: Fix calling device_lock() on non-initialized device 2023-11-08 17:26:44 +01:00
rpmsg_ns.c rpmsg: Fix calling device_lock() on non-initialized device 2023-11-08 17:26:44 +01:00
virtio_rpmsg_bus.c rpmsg: virtio: Fix the unregistration of the device rpmsg_ctrl 2022-06-14 18:36:05 +02:00