All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH] drm/i915/uc: Fix double free bug
@ 2022-11-29  9:45 ` Dan Carpenter
  0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2022-11-29  9:45 UTC (permalink / raw)
  To: Jani Nikula
  Cc: intel-gfx, kernel-janitors, Daniel Vetter, Rodrigo Vivi,
	David Airlie

The "fw" pointer is freed again in the clean up code at the end of the
function.  Set it to NULL here to prevent a double free.

Fixes: 016241168dc5 ("drm/i915/uc: use different ggtt pin offsets for uc loads")
Signed-off-by: Dan Carpenter <error27@gmail.com>
---
 drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c b/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c
index 0c80ba51a4bd..8aa9bcae8e72 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c
@@ -585,6 +585,7 @@ int intel_uc_fw_fetch(struct intel_uc_fw *uc_fw)
 
 		/* try to find another blob to load */
 		release_firmware(fw);
+		fw = NULL;
 		err = -ENOENT;
 	}
 
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-12-02 11:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-29  9:45 [Intel-gfx] [PATCH] drm/i915/uc: Fix double free bug Dan Carpenter
2022-11-29  9:45 ` Dan Carpenter
2022-11-29 16:11 ` [Intel-gfx] " Ceraolo Spurio, Daniele
2022-11-29 16:11   ` Ceraolo Spurio, Daniele
2022-12-01 21:03 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2022-12-02 11:34 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.