All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michał Grzelak" <michal.grzelak@intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
	"Jocelyn Falempe" <jfalempe@redhat.com>,
	"Maarten Lankhorst" <dev@lankhorst.se>,
	"Michał Grzelak" <michal.grzelak@intel.com>,
	"Ville Syrjälä" <ville.syrjala@linux.intel.com>
Subject: Re: [PATCH] drm/i915/panic: fix panic structure allocation memory leak
Date: Thu, 2 Oct 2025 13:51:02 +0200 (CEST)	[thread overview]
Message-ID: <3198b351-b780-e068-e8b3-39608ebc597b@intel.com> (raw)
In-Reply-To: <20251002101756.2700320-1-jani.nikula@intel.com>

[-- Attachment #1: Type: text/plain, Size: 1135 bytes --]

On Thu, 2 Oct 2025, Jani Nikula wrote:
> Separating the panic allocation from framebuffer allocation in commit
> 729c5f7ffa83 ("drm/{i915,xe}/panic: move framebuffer allocation where it
> belongs") failed to deallocate the panic structure anywhere.
>
> The fix is two-fold. First, free the panic structure in
> intel_user_framebuffer_destroy() in the general case. Second, move the
> panic allocation later to intel_framebuffer_init() to not leak the panic
> structure in error paths (if any, now or later) between
> intel_framebuffer_alloc() and intel_framebuffer_init().
>
> Fixes: 729c5f7ffa83 ("drm/{i915,xe}/panic: move framebuffer allocation where it belongs")
> Cc: Jocelyn Falempe <jfalempe@redhat.com>
> Cc: Maarten Lankhorst <dev@lankhorst.se>
> Reported-by: Michał Grzelak <michal.grzelak@intel.com>
> Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>

Have run a bunch of tests on affected platform, which previously caused
the issue to surface. With the patch applied no memleaks are reported.

Tested-by: Michał Grzelak <michal.grzelak@intel.com>

BR,
Michał

  parent reply	other threads:[~2025-10-02 11:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-02 10:17 [PATCH] drm/i915/panic: fix panic structure allocation memory leak Jani Nikula
2025-10-02 10:46 ` ✗ CI.checkpatch: warning for " Patchwork
2025-10-02 10:48 ` ✓ CI.KUnit: success " Patchwork
2025-10-02 11:24 ` ✓ Xe.CI.BAT: " Patchwork
2025-10-02 11:51 ` Michał Grzelak [this message]
2025-10-02 15:18   ` [PATCH] " Jani Nikula
2025-10-02 12:41 ` ✗ Xe.CI.Full: failure for " Patchwork
2025-10-02 15:04 ` ✓ i915.CI.BAT: success " Patchwork
2025-10-02 18:52 ` ✗ i915.CI.Full: failure " 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=3198b351-b780-e068-e8b3-39608ebc597b@intel.com \
    --to=michal.grzelak@intel.com \
    --cc=dev@lankhorst.se \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    --cc=jfalempe@redhat.com \
    --cc=ville.syrjala@linux.intel.com \
    /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 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.