Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Shuicheng Lin <shuicheng.lin@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: Shuicheng Lin <shuicheng.lin@intel.com>
Subject: [PATCH 0/2] drm/xe: Fix double-free of managed BOs in error paths
Date: Fri, 17 Apr 2026 16:18:59 +0000	[thread overview]
Message-ID: <20260417161901.3416021-1-shuicheng.lin@intel.com> (raw)

Two callers of xe_managed_bo_create_pin_map() explicitly free the BO via
xe_bo_unpin_map_no_vm() in their error paths. Since the managed BO
already has a devm cleanup action registered, this causes a double-free
when devm unwinds during probe failure.

Remove the explicit frees and let devm handle cleanup, consistent with
all other xe_managed_bo_create_pin_map() callers.

Shuicheng Lin (2):
  drm/xe/gsc: Fix double-free of managed BO in error path
  drm/xe/hw_engine: Fix double-free of managed BO in error path

 drivers/gpu/drm/xe/xe_gsc.c       | 5 +----
 drivers/gpu/drm/xe/xe_hw_engine.c | 4 +---
 2 files changed, 2 insertions(+), 7 deletions(-)

-- 
2.43.0


             reply	other threads:[~2026-04-17 16:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-17 16:18 Shuicheng Lin [this message]
2026-04-17 16:19 ` [PATCH 1/2] drm/xe/gsc: Fix double-free of managed BO in error path Shuicheng Lin
2026-04-17 16:19 ` [PATCH 2/2] drm/xe/hw_engine: " Shuicheng Lin
2026-04-20 19:02 ` ✗ CI.checkpatch: warning for drm/xe: Fix double-free of managed BOs in error paths Patchwork
2026-04-20 19:03 ` ✓ CI.KUnit: success " Patchwork
2026-04-20 19:51 ` ✓ Xe.CI.BAT: " Patchwork
2026-04-20 22:47 ` ✓ Xe.CI.FULL: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260417161901.3416021-1-shuicheng.lin@intel.com \
    --to=shuicheng.lin@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox