Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752731AbdHBUx0 (ORCPT ); Wed, 2 Aug 2017 16:53:26 -0400 Received: from smtp.domeneshop.no ([194.63.252.55]:38738 "EHLO smtp.domeneshop.no" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752299AbdHBUxZ (ORCPT ); Wed, 2 Aug 2017 16:53:25 -0400 Subject: Re: [PATCH 1/3] drm/vc4: Fix double destroy of the BO cache on teardown. To: Eric Anholt , dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org References: <20170802203242.12815-1-eric@anholt.net> From: =?UTF-8?Q?Noralf_Tr=c3=b8nnes?= Message-ID: Date: Wed, 2 Aug 2017 22:53:06 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170802203242.12815-1-eric@anholt.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1108 Lines: 32 Den 02.08.2017 22.32, skrev Eric Anholt: > It's also destroyed from the top level vc4_drv.c initialization, which > is where the cache was actually initialized from. > > This used to just involve duplicate del_timer() and cancel_work_sync() > being called, but it started causing kmalloc issues once we > double-freed the new BO label array. > > Fixes: 1908a876f909 ("drm/vc4: Add an ioctl for labeling GEM BOs for summary stats") > Signed-off-by: Eric Anholt > --- > drivers/gpu/drm/vc4/vc4_gem.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c > index 209fccd0d3b4..892a031a3ced 100644 > --- a/drivers/gpu/drm/vc4/vc4_gem.c > +++ b/drivers/gpu/drm/vc4/vc4_gem.c > @@ -1117,6 +1117,4 @@ vc4_gem_destroy(struct drm_device *dev) > > if (vc4->hang_state) > vc4_free_hang_state(dev, vc4->hang_state); > - > - vc4_bo_cache_destroy(dev); > } I don't have a display connected, but there's no crashing anymore. Tested-by: Noralf Trønnes Acked-by: Noralf Trønnes