All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh+dt@kernel.org>
To: Boris Brezillon <boris.brezillon@collabora.com>
Cc: Tomeu Vizoso <tomeu@tomeuvizoso.net>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	stable <stable@vger.kernel.org>
Subject: Re: [PATCH v2] drm/panfrost: Make sure a BO is only unmapped when appropriate
Date: Tue, 18 Jun 2019 09:29:12 -0600	[thread overview]
Message-ID: <CAL_JsqJhUxtAjbwUDppA3opAK4h9ws0wVuFT66yYZ7NU1=GzPg@mail.gmail.com> (raw)
In-Reply-To: <20190618081343.16927-1-boris.brezillon@collabora.com>

On Tue, Jun 18, 2019 at 2:13 AM Boris Brezillon
<boris.brezillon@collabora.com> wrote:
>
> mmu_ops->unmap() will fail when called on a BO that has not been
> previously mapped, and the error path in panfrost_ioctl_create_bo()
> can call drm_gem_object_put_unlocked() (which in turn calls
> panfrost_mmu_unmap()) on a BO that has not been mapped yet.
>
> Keep track of the mapped/unmapped state to avoid such issues.
>
> Fixes: f3ba91228e8e ("drm/panfrost: Add initial panfrost driver")
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
> ---
> Changes in v2:
> * Check is_mapped val in the caller and add WARN_ON() in the mmu code
>   (suggested by Tomeu)
> ---
>  drivers/gpu/drm/panfrost/panfrost_gem.c | 3 ++-
>  drivers/gpu/drm/panfrost/panfrost_gem.h | 1 +
>  drivers/gpu/drm/panfrost/panfrost_mmu.c | 8 ++++++++
>  3 files changed, 11 insertions(+), 1 deletion(-)

Applied.

Rob

      reply	other threads:[~2019-06-18 15:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-18  8:13 [PATCH v2] drm/panfrost: Make sure a BO is only unmapped when appropriate Boris Brezillon
2019-06-18 15:29 ` Rob Herring [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='CAL_JsqJhUxtAjbwUDppA3opAK4h9ws0wVuFT66yYZ7NU1=GzPg@mail.gmail.com' \
    --to=robh+dt@kernel.org \
    --cc=boris.brezillon@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=stable@vger.kernel.org \
    --cc=tomeu@tomeuvizoso.net \
    /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.