This is a note to let you know that I've just added the patch titled rpmsg: glink: Release driver_override to the 5.15-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-5.15 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:28:20 2023 From: Lee Jones <lee@xxxxxxxxxx> Date: Tue, 31 Oct 2023 11:25:39 +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: <20231031112545.2277797-5-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 Signed-off-by: Lee Jones <lee@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/rpmsg/qcom_glink_native.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/rpmsg/qcom_glink_native.c +++ b/drivers/rpmsg/qcom_glink_native.c @@ -1395,6 +1395,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); } @@ -1623,6 +1624,7 @@ static void qcom_glink_device_release(st /* Release qcom_glink_alloc_channel() reference */ kref_put(&channel->refcount, qcom_glink_channel_release); + kfree(rpdev->driver_override); kfree(rpdev); } Patches currently in stable-queue which might be from stable-owner@xxxxxxxxxxxxxxx are queue-5.15/ext4-avoid-overlapping-preallocations-due-to-overflow.patch queue-5.15/ext4-fix-bug-in-ext4_mb_new_inode_pa-due-to-overflow.patch queue-5.15/rpmsg-fix-calling-device_lock-on-non-initialized-device.patch queue-5.15/rpmsg-constify-local-variable-in-field-store-macro.patch queue-5.15/rpmsg-glink-release-driver_override.patch queue-5.15/driver-platform-add-helper-for-safer-setting-of-driver_override.patch queue-5.15/rpmsg-fix-kfree-of-static-memory-on-setting-driver_override.patch queue-5.15/rpmsg-fix-possible-refcount-leak-in-rpmsg_register_device_override.patch queue-5.15/ext4-add-two-helper-functions-extent_logical_end-and-pa_logical_end.patch