From: Jordan Crouse <jcrouse@codeaurora.org>
To: YueHaibing <yuehaibing@huawei.com>
Cc: robdclark@gmail.com, airlied@linux.ie, seanpaul@chromium.org,
linux-kernel@vger.kernel.org, jsanka@codeaurora.org,
linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
freedreno@lists.freedesktop.org
Subject: Re: [PATCH -next] drm/msm: dpu: Fix "WARNING: invalid free of devm_ allocated data"
Date: Fri, 16 Nov 2018 13:22:57 -0700 [thread overview]
Message-ID: <20181116202257.GC6285@jcrouse-lnx.qualcomm.com> (raw)
In-Reply-To: <20181116112526.10552-1-yuehaibing@huawei.com>
On Fri, Nov 16, 2018 at 07:25:26PM +0800, YueHaibing wrote:
> 'dpu_enc' is a member of 'drm_enc'
> And 'drm_enc' got allocated with devm_kzalloc in dpu_encoder_init.
>
> This gives this error message:
> ./drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c:459:1-6:
> WARNING: invalid free of devm_ allocated data
I had partial fix of this in my ill-fated patch from a few weeks ago but this
is better.
Reviewed-by: Jordan Crouse <jcrouse@codeaurora.org>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
> index 82c55ef..99526d9 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
> @@ -455,8 +455,6 @@ static void dpu_encoder_destroy(struct drm_encoder *drm_enc)
>
> drm_encoder_cleanup(drm_enc);
> mutex_destroy(&dpu_enc->enc_lock);
> -
> - kfree(dpu_enc);
> }
>
> void dpu_encoder_helper_split_config(
> --
> 2.7.0
>
>
--
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
next prev parent reply other threads:[~2018-11-16 20:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-16 11:25 YueHaibing
2018-11-16 20:22 ` Jordan Crouse [this message]
2018-11-16 21:38 ` Sean Paul
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=20181116202257.GC6285@jcrouse-lnx.qualcomm.com \
--to=jcrouse@codeaurora.org \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=jsanka@codeaurora.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robdclark@gmail.com \
--cc=seanpaul@chromium.org \
--cc=yuehaibing@huawei.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
all inboxes | Powered by JetHome®