FAILED: patch "[PATCH] drm/vc4: Fix firmware reference leak in vc4_drm_bind()" failed to apply to 6.1-stable tree
Subsystems (4)
[email protected]
maintainerThe patch below does not apply to the 6.1-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.1.y
git checkout FETCH_HEAD
git cherry-pick -x b816da5d5df1461446a0a5f3fe2b4948a659a790
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026101259-chess-obstruct-51c3@gregkh' --subject-prefix 'PATCH 6.1.y' 'HEAD^..'
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From b816da5d5df1461446a0a5f3fe2b4948a659a790 Mon Sep 17 00:00:00 2001
From: Wentao Liang <[email protected]>
Date: Wed, 16 Sep 2026 15:40:15 +0000
Subject: [PATCH] drm/vc4: Fix firmware reference leak in vc4_drm_bind()
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The firmware reference obtained via rpi_firmware_get() is leaked when aperture_remove_all_conflicting_devices() fails, as the error label returns without putting it. This happens before the firmware is consumed and put further down in the function.
Put the firmware reference before jumping to err.
drivers/gpu/drm/vc4/vc4_drv.c +4 -1
@@ -360,8 +360,11 @@ static int vc4_drm_bind(struct device *dev) } ret =aperture_remove_all_conflicting_devices (driver->name); -if (ret) +if (ret) { +if (firmware) +rpi_firmware_put (firmware); goto err; + }if (firmware) { ret = rpi_firmware_property(firmware,
Sasha Levin
maintainerPATCH 1/1 drm/vc4: Fix firmware reference leak in vc4_drm_bind()
From: Wentao Liang <[email protected]>
[ Upstream commit b816da5d5df1461446a0a5f3fe2b4948a659a790 ]
The firmware reference obtained via rpi_firmware_get() is leaked when aperture_remove_all_conflicting_devices() fails, as the error label returns without putting it. This happens before the firmware is consumed and put further down in the function.
Put the firmware reference before jumping to err.
--- drivers/gpu/drm/vc4/vc4_drv.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/vc4/vc4_drv.c +4 -1
@@ -352,8 +352,11 @@ static int vc4_drm_bind(struct device *dev) } ret =drm_aperture_remove_framebuffers (driver); -if (ret) +if (ret) { +if (firmware) +rpi_firmware_put (firmware);return ret; + }if (firmware) { ret = rpi_firmware_property(firmware,
Signature · 1 line
2.53.0