This is a note to let you know that I've just added the patch titled rpmsg: glink: Release driver_override to the 4.14-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: rpmsg-glink-release-driver_override.patch and it can be found in the queue-4.14 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From stable-owner@xxxxxxxxxxxxxxx Tue Oct 31 12:42:15 2023 From: Lee Jones <lee@xxxxxxxxxx> Date: Tue, 31 Oct 2023 11:41:49 +0000 Subject: rpmsg: glink: Release driver_override To: lee@xxxxxxxxxx Cc: stable@xxxxxxxxxxxxxxx, Bjorn Andersson <quic_bjorande@xxxxxxxxxxx>, Chris Lew <quic_clew@xxxxxxxxxxx>, Bjorn Andersson <andersson@xxxxxxxxxx> Message-ID: <20231031114155.2289410-4-lee@xxxxxxxxxx> From: Bjorn Andersson <quic_bjorande@xxxxxxxxxxx> commit fb80ef67e8ff6a00d3faad4cb348dafdb8eccfd8 upstream. Upon termination of the rpmsg_device, driver_override needs to be freed to avoid leaking the potentially assigned string. Fixes: 42cd402b8fd4 ("rpmsg: Fix kfree() of static memory on setting driver_override") Fixes: 39e47767ec9b ("rpmsg: Add driver_override device attribute for rpmsg_device") Reviewed-by: Chris Lew <quic_clew@xxxxxxxxxxx> Signed-off-by: Bjorn Andersson <quic_bjorande@xxxxxxxxxxx> Signed-off-by: Bjorn Andersson <andersson@xxxxxxxxxx> Link: https://lore.kernel.org/r/20230109223931.1706429-1-quic_bjorande@xxxxxxxxxxx (cherry picked from commit fb80ef67e8ff6a00d3faad4cb348dafdb8eccfd8) Signed-off-by: Lee Jones <lee@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/rpmsg/qcom_glink_native.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/rpmsg/qcom_glink_native.c +++ b/drivers/rpmsg/qcom_glink_native.c @@ -1354,6 +1354,7 @@ static void qcom_glink_rpdev_release(str struct glink_channel *channel = to_glink_channel(rpdev->ept); channel->rpdev = NULL; + kfree(rpdev->driver_override); kfree(rpdev); } Patches currently in stable-queue which might be from stable-owner@xxxxxxxxxxxxxxx are queue-4.14/rpmsg-fix-calling-device_lock-on-non-initialized-device.patch queue-4.14/rpmsg-glink-release-driver_override.patch queue-4.14/driver-platform-add-helper-for-safer-setting-of-driver_override.patch queue-4.14/rpmsg-fix-kfree-of-static-memory-on-setting-driver_override.patch queue-4.14/rpmsg-fix-possible-refcount-leak-in-rpmsg_register_device_override.patch