Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Sean Paul <sean@poorly.run>
To: YueHaibing <yuehaibing@huawei.com>
Cc: airlied@linux.ie, linux-arm-msm@vger.kernel.org,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	seanpaul@chromium.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 16:38:12 -0500	[thread overview]
Message-ID: <20181116213812.GB154160@art_vandelay> (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'

It's the other way around :)

> 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
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Reviewed-by: Sean Paul <sean@poorly.run>

> ---
>  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
> 
> 

-- 
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

      parent reply	other threads:[~2018-11-16 21:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-16 11:25 [PATCH -next] drm/msm: dpu: Fix "WARNING: invalid free of devm_ allocated data" YueHaibing
     [not found] ` <20181116112526.10552-1-yuehaibing-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2018-11-16 20:22   ` Jordan Crouse
2018-11-16 21:38 ` Sean Paul [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=20181116213812.GB154160@art_vandelay \
    --to=sean@poorly.run \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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