From: Jani Nikula <jani.nikula@linux.intel.com>
To: Matt Roper <matthew.d.roper@intel.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Don't leak VBT mode data
Date: Tue, 15 Sep 2015 10:50:45 +0300 [thread overview]
Message-ID: <87mvwounmy.fsf@intel.com> (raw)
In-Reply-To: <1442283858-27254-1-git-send-email-matthew.d.roper@intel.com>
On Tue, 15 Sep 2015, Matt Roper <matthew.d.roper@intel.com> wrote:
> We allocate memory for LVDS modes while parsing the VBT at startup, but
> never free this memory when the driver is unloaded, causing a small
> leak.
>
> Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
We could probably use devm_*alloc functions for this kind of stuff more.
> ---
> drivers/gpu/drm/i915/i915_dma.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
> index 066a0ef..c069550 100644
> --- a/drivers/gpu/drm/i915/i915_dma.c
> +++ b/drivers/gpu/drm/i915/i915_dma.c
> @@ -1137,6 +1137,10 @@ int i915_driver_unload(struct drm_device *dev)
> dev_priv->vbt.child_dev = NULL;
> dev_priv->vbt.child_dev_num = 0;
> }
> + kfree(dev_priv->vbt.sdvo_lvds_vbt_mode);
> + dev_priv->vbt.sdvo_lvds_vbt_mode = NULL;
> + kfree(dev_priv->vbt.lfp_lvds_vbt_mode);
> + dev_priv->vbt.lfp_lvds_vbt_mode = NULL;
>
> vga_switcheroo_unregister_client(dev->pdev);
> vga_client_register(dev->pdev, NULL, NULL, NULL);
> --
> 2.1.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-09-15 7:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-15 2:24 [PATCH] drm/i915: Don't leak VBT mode data Matt Roper
2015-09-15 7:50 ` Jani Nikula [this message]
2015-09-23 9:23 ` Daniel Vetter
2015-09-23 11:02 ` Jani Nikula
2015-09-23 13:15 ` Daniel Vetter
2015-09-18 11:27 ` Jani Nikula
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=87mvwounmy.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=matthew.d.roper@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.