Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Wajdeczko <michal.wajdeczko@intel.com>
To: Shuicheng Lin <shuicheng.lin@intel.com>,
	<intel-xe@lists.freedesktop.org>
Cc: Matthew Brost <matthew.brost@intel.com>
Subject: Re: [PATCH] drm/xe/hw_engine_group: Avoid call kfree() for drmm_kzalloc()
Date: Fri, 25 Jul 2025 10:08:27 +0200	[thread overview]
Message-ID: <89f6c8b4-9b2e-48aa-b00a-2c15c3062b97@intel.com> (raw)
In-Reply-To: <20250724193854.1124510-2-shuicheng.lin@intel.com>



On 7/24/2025 9:38 PM, Shuicheng Lin wrote:
> Memory allocated with drmm_kzalloc() should not be freed using kfree(), as it
> is managed by the DRM subsystem. The memory will be automatically freed when
> the associated drm_device is released.
> These 3 group pointers are allocated using drmm_kzalloc() in hw_engine_group_alloc(),
> so they don't require manual deallocation.
> 
> Fixes: 67979060740f ("drm/xe/hw_engine_group: Fix potential leak")
> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Matthew Brost <matthew.brost@intel.com>
> Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
> ---

fixed commit description per checkpatch complain and pushed

thanks for the fix!

Michal

      parent reply	other threads:[~2025-07-25  8:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-24 19:38 [PATCH] drm/xe/hw_engine_group: Avoid call kfree() for drmm_kzalloc() Shuicheng Lin
2025-07-24 19:51 ` Matthew Brost
2025-07-24 20:04 ` ✗ CI.checkpatch: warning for " Patchwork
2025-07-24 20:05 ` ✓ CI.KUnit: success " Patchwork
2025-07-24 20:47 ` ✓ Xe.CI.BAT: " Patchwork
2025-07-25  1:06 ` ✓ Xe.CI.Full: " Patchwork
2025-07-25  8:08 ` Michal Wajdeczko [this message]

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=89f6c8b4-9b2e-48aa-b00a-2c15c3062b97@intel.com \
    --to=michal.wajdeczko@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.brost@intel.com \
    --cc=shuicheng.lin@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox