Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b05d8acf authored by Hangyu Hua's avatar Hangyu Hua Committed by Lee Jones
Browse files

UPSTREAM: rpmsg: Fix possible refcount leak in rpmsg_register_device_override()



commit d7bd416d35121c95fe47330e09a5c04adbc5f928 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.

Bug: 295334746
Fixes: bb17d110cbf2 ("rpmsg: Fix calling device_lock() on non-initialized device")
Reviewed-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: default avatarHangyu Hua <hbh25y@gmail.com>
Link: https://lore.kernel.org/r/20220624024120.11576-1-hbh25y@gmail.com


Signed-off-by: default avatarMathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: default avatarLee Jones <lee@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit d4c8bf5635c4bedaf2470761ced1f502b2d5434e)
Signed-off-by: default avatarLee Jones <joneslee@google.com>
Change-Id: I10440a18479d5d207bafb706311c0467b853cf6c
parent 9e43c50d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment