[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAL_JsqLfKOQrut_i=038zFF6Bb8vGNRjuG2sE2m2GsoWo6vr4g@mail.gmail.com>
Date: Tue, 29 Oct 2019 13:27:17 -0500
From: Rob Herring <robh@...nel.org>
To: Robin Murphy <robin.murphy@....com>
Cc: Tomeu Vizoso <tomeu.vizoso@...labora.com>,
Steven Price <steven.price@....com>,
dri-devel <dri-devel@...ts.freedesktop.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drm/panfrost: Don't dereference bogus MMU pointers
On Mon, Oct 28, 2019 at 3:08 PM Robin Murphy <robin.murphy@....com> wrote:
>
> It seems that killing an application while faults are occurring
> (particularly with a GPU in FPGA at a whopping 40MHz) can lead to
> handling a lingering page fault after all the address space contexts
> have already been freed. In this situation, the LRU list is empty so
> addr_to_drm_mm_node() ends up dereferencing the list head as if it were
> a struct panfrost_mmu entry; this leaves "mmu->as" actually pointing at
> the pfdev->alloc_mask bitmap, which is also empty, and given that the
> fault has a high likelihood of being in AS0, hilarity ensues.
>
> Sadly, the cleanest solution seems to involve another goto. Oh well, at
> least it's robust...
>
> Signed-off-by: Robin Murphy <robin.murphy@....com>
> ---
> drivers/gpu/drm/panfrost/panfrost_mmu.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Applied to drm-misc-fixes
Rob
Powered by blists - more mailing lists