From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: <intel-xe@lists.freedesktop.org>,
Jani Nikula <jani.nikula@linux.intel.com>
Subject: Re: [PATCH] drm/xe: Fix opregion leak
Date: Thu, 25 Jul 2024 13:13:41 -0400 [thread overview]
Message-ID: <ZqKHxVQFF96uNdfi@intel.com> (raw)
In-Reply-To: <20240724215309.644423-1-lucas.demarchi@intel.com>
On Wed, Jul 24, 2024 at 02:53:09PM -0700, Lucas De Marchi wrote:
> Being part o the display, ideally the setup and cleanup would be done by
> display itself. However this is a bigger refactor that needs to be done
> on both i915 and xe. For now, just fix the leak:
>
> unreferenced object 0xffff8881a0300008 (size 192):
> comm "modprobe", pid 4354, jiffies 4295647021
> hex dump (first 32 bytes):
> 00 00 87 27 81 88 ff ff 18 80 9b 00 00 c9 ff ff ...'............
> 18 81 9b 00 00 c9 ff ff 00 00 00 00 00 00 00 00 ................
> backtrace (crc 99260e31):
> [<ffffffff823ce65b>] kmemleak_alloc+0x4b/0x80
> [<ffffffff81493be2>] kmalloc_trace_noprof+0x312/0x3d0
> [<ffffffffa1345679>] intel_opregion_setup+0x89/0x700 [xe]
> [<ffffffffa125bfaf>] xe_display_init_noirq+0x2f/0x90 [xe]
> [<ffffffffa1199ec3>] xe_device_probe+0x7a3/0xbf0 [xe]
> [<ffffffffa11f3713>] xe_pci_probe+0x333/0x5b0 [xe]
> [<ffffffff81af6be8>] local_pci_probe+0x48/0xb0
> [<ffffffff81af8778>] pci_device_probe+0xc8/0x280
> [<ffffffff81d09048>] really_probe+0xf8/0x390
> [<ffffffff81d0937a>] __driver_probe_device+0x8a/0x170
> [<ffffffff81d09503>] driver_probe_device+0x23/0xb0
> [<ffffffff81d097b7>] __driver_attach+0xc7/0x190
> [<ffffffff81d0628d>] bus_for_each_dev+0x7d/0xd0
> [<ffffffff81d0851e>] driver_attach+0x1e/0x30
> [<ffffffff81d07ac7>] bus_add_driver+0x117/0x250
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
>
> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
> ---
> drivers/gpu/drm/xe/display/xe_display.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c
> index 8b83dcff72e1..ca4468c82078 100644
> --- a/drivers/gpu/drm/xe/display/xe_display.c
> +++ b/drivers/gpu/drm/xe/display/xe_display.c
> @@ -132,6 +132,7 @@ static void xe_display_fini_noirq(void *arg)
> return;
>
> intel_display_driver_remove_noirq(xe);
> + intel_opregion_cleanup(xe);
> }
>
> int xe_display_init_noirq(struct xe_device *xe)
> @@ -157,8 +158,10 @@ int xe_display_init_noirq(struct xe_device *xe)
> intel_display_device_info_runtime_init(xe);
>
> err = intel_display_driver_probe_noirq(xe);
> - if (err)
> + if (err) {
> + intel_opregion_cleanup(xe);
> return err;
> + }
>
> return devm_add_action_or_reset(xe->drm.dev, xe_display_fini_noirq, xe);
> }
> --
> 2.43.0
>
next prev parent reply other threads:[~2024-07-25 17:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-24 21:53 [PATCH] drm/xe: Fix opregion leak Lucas De Marchi
2024-07-24 21:58 ` ✓ CI.Patch_applied: success for " Patchwork
2024-07-24 21:59 ` ✓ CI.checkpatch: " Patchwork
2024-07-24 22:00 ` ✓ CI.KUnit: " Patchwork
2024-07-24 22:12 ` ✓ CI.Build: " Patchwork
2024-07-24 22:14 ` ✓ CI.Hooks: " Patchwork
2024-07-24 22:16 ` ✓ CI.checksparse: " Patchwork
2024-07-24 22:36 ` ✓ CI.BAT: " Patchwork
2024-07-25 0:20 ` ✗ CI.FULL: failure " Patchwork
2024-07-25 17:13 ` Rodrigo Vivi [this message]
2024-07-26 17:13 ` [PATCH] " Lucas De Marchi
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=ZqKHxVQFF96uNdfi@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=lucas.demarchi@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