From: Andi Shyti <andi.shyti@linux.intel.com>
To: Andrzej Hajda <andrzej.hajda@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>,
intel-gfx@lists.freedesktop.org,
Matthew Auld <matthew.auld@intel.com>
Subject: Re: [Intel-gfx] [PATCH v2] drm/i915: do not clean GT table on error path
Date: Thu, 16 Nov 2023 12:44:30 +0100 [thread overview]
Message-ID: <ZVYAnhUoL-C0zdBK@ashyti-mobl2.lan> (raw)
In-Reply-To: <20231115-dont_clean_gt_on_error_path-v2-1-54250125470a@intel.com>
Hi Andrzej,
On Wed, Nov 15, 2023 at 11:54:03AM +0100, Andrzej Hajda wrote:
> The only task of intel_gt_release_all is to zero gt table. Calling
> it on error path prevents intel_gt_driver_late_release_all (called from
> i915_driver_late_release) to cleanup GTs, causing leakage.
> After i915_driver_late_release GT array is not used anymore so
> it does not need cleaning at all.
>
> Sample leak report:
>
> BUG i915_request (...): Objects remaining in i915_request on __kmem_cache_shutdown()
> ...
> Object 0xffff888113420040 @offset=64
> Allocated in __i915_request_create+0x75/0x610 [i915] age=18339 cpu=1 pid=1454
> kmem_cache_alloc+0x25b/0x270
> __i915_request_create+0x75/0x610 [i915]
> i915_request_create+0x109/0x290 [i915]
> __engines_record_defaults+0xca/0x440 [i915]
> intel_gt_init+0x275/0x430 [i915]
> i915_gem_init+0x135/0x2c0 [i915]
> i915_driver_probe+0x8d1/0xdc0 [i915]
>
> v2: removed whole intel_gt_release_all
>
> Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/8489
> Fixes: bec68cc9ea42d8 ("drm/i915: Prepare for multiple GTs")
> Signed-off-by: Andrzej Hajda <andrzej.hajda@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Andi
next prev parent reply other threads:[~2023-11-16 11:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-15 10:54 [Intel-gfx] [PATCH v2] drm/i915: do not clean GT table on error path Andrzej Hajda
2023-11-15 11:12 ` Tvrtko Ursulin
2023-11-15 16:28 ` Nirmoy Das
2023-11-15 21:18 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: do not clean GT table on error path (rev3) Patchwork
2023-11-15 21:32 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-11-16 11:44 ` Andi Shyti [this message]
2023-11-16 12:34 ` [Intel-gfx] [PATCH v2] drm/i915: do not clean GT table on error path Andrzej Hajda
2023-11-17 4:49 ` [Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915: do not clean GT table on error path (rev3) 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=ZVYAnhUoL-C0zdBK@ashyti-mobl2.lan \
--to=andi.shyti@linux.intel.com \
--cc=andrzej.hajda@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=matthew.auld@intel.com \
--cc=tvrtko.ursulin@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