From 37d89e0f93601e520edcdc41dc68197dff736c1e Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Thu, 9 Jul 2020 19:13:59 -0400 Subject: [PATCH] panfrost: Fix write to free'd memory No clue how this worked before. Signed-off-by: Alyssa Rosenzweig Reviewed-by: Boris Brezillon Fixes: 82f18b713ac ("panfrost: Keep track of active BOs") Cc: mesa-stable Part-of: --- src/panfrost/encoder/pan_bo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/panfrost/encoder/pan_bo.c b/src/panfrost/encoder/pan_bo.c index 53249e87301..b25e91d5d22 100644 --- a/src/panfrost/encoder/pan_bo.c +++ b/src/panfrost/encoder/pan_bo.c @@ -502,7 +502,7 @@ panfrost_bo_import(struct panfrost_device *dev, int fd) * acquired it in the meantime. */ if (p_atomic_read(&bo->refcnt) == 0) - p_atomic_set(&newbo->refcnt, 1); + p_atomic_set(&bo->refcnt, 1); else panfrost_bo_reference(bo); assert(bo->cpu); -- 2.30.2