Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp903323pxb; Wed, 3 Nov 2021 14:29:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxj17tYMSq5O6EoLl6fOIPC+73UN11laWkhoCwwHXu+3IGf/gDJcQhj9iC5rr1JDxZNq1Bn X-Received: by 2002:a05:6602:2e85:: with SMTP id m5mr20406670iow.30.1635974993138; Wed, 03 Nov 2021 14:29:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635974993; cv=none; d=google.com; s=arc-20160816; b=q5gDxhTJuj1PjT/Wi/20iAeGtkmOSaIt2KOPt8qTqDvp9sktud1EszkWM6syxabFcD HdYutyxZR5zpO0x+HMBTeeTjMH4Qtkz411cnB2X8e7FwutpcAxDsfvWL36+eJKSUoa6/ 4avQYnJBl5enoFpmU0/Rz6DaTyidklkeH2v6QvD4iaRjlmgFtkMxSjt8qPNQzvAOBKX5 VfFQ3WVfCZLwrk/ScQPBHdZK+wP/Q5H052/sUVm5UzBgg5dy1y9K6a/UlJKFnueUVkv4 gmxXEBW33H978jRMsCCxSYTZ2CPCkegkFzRNyNIL/lOg5qPcPJJ7MKjOi7lmGzrqd0vO GGMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=Znlql06AhhI7EaphpwppCQqpnxjsVHdYSJklJrdqL1M=; b=0dAPxMe6S//NMS3FJWp7LFNARV83fWa+JBeKIj7NaG9Sie2eBA2BCTo+J5BlbfZLxa SuvTBx+QjKXRIsN6JQrdF0iIgMWDBKeVCXEZrk4eXu2Cj6PnwLIo68K490hRtx+wLBal uwpCw5s/3zqi8uceZHUMfNz7ehWLvZh0HD7PpUnp8yuQu7o13bcyfjO3uCM/2LNsY/9t zSWAXx++JcPVfwpHRt4doL54I76DDlg4kJSDTxA0jyKpnvnf5A335+P8HuJFSohTUYW4 KoZnUqVDp8lQAhq81hkfP6eEuuRV10qGTFizTOLF6SHJnDfj6JBu/OWXFRuvlagpqK9d zy6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=EOJbcZov; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f18si5618967jav.26.2021.11.03.14.29.15; Wed, 03 Nov 2021 14:29:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=EOJbcZov; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230221AbhKCV2u (ORCPT + 99 others); Wed, 3 Nov 2021 17:28:50 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:38404 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230070AbhKCV2s (ORCPT ); Wed, 3 Nov 2021 17:28:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1635974771; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Znlql06AhhI7EaphpwppCQqpnxjsVHdYSJklJrdqL1M=; b=EOJbcZovDDx+a2qFSS/xOYnGWXdmec8ETRP5qSd15DlZt3K3SftULTM33dhLU5PJ2Fnv/S DC5WH4hjzl0MWkEwNkuZhjxJmHomZN/lh/IRWmzyCXtanvl6wGb5OaqwTM01KOaU+bUjpr 0VwGNwf+3ifiYFUoHmyzml/Z//N61Sw= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-299-P4bTqH89P6KRnRkbfaVTMQ-1; Wed, 03 Nov 2021 17:26:10 -0400 X-MC-Unique: P4bTqH89P6KRnRkbfaVTMQ-1 Received: by mail-wm1-f70.google.com with SMTP id o22-20020a1c7516000000b0030d6f9c7f5fso1643639wmc.1 for ; Wed, 03 Nov 2021 14:26:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=Znlql06AhhI7EaphpwppCQqpnxjsVHdYSJklJrdqL1M=; b=lB3XPnUCxL3PkV9UiJJAcDtj3CvNzUu/KdSKYJGP2bb1hcPccy7ptu2cquzPPmIy1M QkuPs9PabLMeXHq3/PXli5DVWJUCnn5GbR+v6eZo5EhcJeXcauUhDQf7L8HPIAhdRFwk kgGdYzIpEEalZlFQFhj6YHh+fuMybPJjvA18LH8JWqWMycRLOvEfpk8RUnN+27vhawDl y+KH7jZ2affHuPE3IiUsJAcngN8uKequT4F4WZuSqPyVSLHSuywkC9vDIVaV0KsOnf/d 8POshklIty8F64XGiG56bbzoGps8gpcTbQ7GP6A3WbTgGlSpEFa4gBFgweg+SLGc/PwW E+og== X-Gm-Message-State: AOAM530FpG8htLXZw8Tkc/3MPEMdlScEfjJkAwoDQTzn+FYeVgPN5E0r JYAf7JiWA4CHUhZ3GCOHSzgnqbeR/r0Q30Yq9muqFCEAmAoB8R15rDZxtNSMGhKPiSFRNtU+k0r 59RKqx/JmN82ssj+JorZxq3ghDEa6DGXTGPPPPj0D X-Received: by 2002:a05:6000:2ae:: with SMTP id l14mr5061533wry.142.1635974768720; Wed, 03 Nov 2021 14:26:08 -0700 (PDT) X-Received: by 2002:a05:6000:2ae:: with SMTP id l14mr5061507wry.142.1635974768434; Wed, 03 Nov 2021 14:26:08 -0700 (PDT) MIME-Version: 1.0 References: <20211101082511.254155853@linuxfoundation.org> <20211101082518.624936309@linuxfoundation.org> <871r3x2f0y.fsf@turtle.gmx.de> <87tugt0xx6.fsf@turtle.gmx.de> In-Reply-To: <87tugt0xx6.fsf@turtle.gmx.de> From: Karol Herbst Date: Wed, 3 Nov 2021 22:25:57 +0100 Message-ID: Subject: Re: [Nouveau] [PATCH 5.10 32/77] drm/ttm: fix memleak in ttm_transfered_destroy To: Sven Joachim Cc: Greg Kroah-Hartman , "Erhard F." , nouveau , LKML , stable@vger.kernel.org, Huang Rui , =?UTF-8?Q?Christian_K=C3=B6nig?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 3, 2021 at 9:47 PM Sven Joachim wrote: > > On 2021-11-03 21:32 +0100, Karol Herbst wrote: > > > On Wed, Nov 3, 2021 at 9:29 PM Karol Herbst wrote: > >> > >> On Wed, Nov 3, 2021 at 8:52 PM Sven Joachim wrote: > >> > > >> > On 2021-11-01 10:17 +0100, Greg Kroah-Hartman wrote: > >> > > >> > > From: Christian K=C3=B6nig > >> > > > >> > > commit 0db55f9a1bafbe3dac750ea669de9134922389b5 upstream. > >> > > > >> > > We need to cleanup the fences for ghost objects as well. > >> > > > >> > > Signed-off-by: Christian K=C3=B6nig > >> > > Reported-by: Erhard F. > >> > > Tested-by: Erhard F. > >> > > Reviewed-by: Huang Rui > >> > > Bug: https://bugzilla.kernel.org/show_bug.cgi?id=3D214029 > >> > > Bug: https://bugzilla.kernel.org/show_bug.cgi?id=3D214447 > >> > > CC: > >> > > Link: https://patchwork.freedesktop.org/patch/msgid/20211020173211= .2247-1-christian.koenig@amd.com > >> > > Signed-off-by: Greg Kroah-Hartman > >> > > --- > >> > > drivers/gpu/drm/ttm/ttm_bo_util.c | 1 + > >> > > 1 file changed, 1 insertion(+) > >> > > > >> > > --- a/drivers/gpu/drm/ttm/ttm_bo_util.c > >> > > +++ b/drivers/gpu/drm/ttm/ttm_bo_util.c > >> > > @@ -322,6 +322,7 @@ static void ttm_transfered_destroy(struc > >> > > struct ttm_transfer_obj *fbo; > >> > > > >> > > fbo =3D container_of(bo, struct ttm_transfer_obj, base); > >> > > + dma_resv_fini(&fbo->base.base._resv); > >> > > ttm_bo_put(fbo->bo); > >> > > kfree(fbo); > >> > > } > >> > > >> > Alas, this innocuous looking commit causes one of my systems to lock= up > >> > as soon as run startx. This happens with the nouveau driver, two ot= her > >> > systems with radeon and intel graphics are not affected. Also I onl= y > >> > noticed it in 5.10.77. Kernels 5.15 and 5.14.16 are not affected, a= nd I > >> > do not use 5.4 anymore. > >> > > >> > I am not familiar with nouveau's ttm management and what has changed > >> > there between 5.10 and 5.14, but maybe one of their developers can s= hed > >> > a light on this. > >> > > >> > Cheers, > >> > Sven > >> > > >> > >> could be related to 265ec0dd1a0d18f4114f62c0d4a794bb4e729bc1 > > > > maybe not.. but I did remember there being a few tmm related patches > > which only hurt nouveau :/ I guess one could do a git bisect to > > figure out what change "fixes" it. > > Maybe, but since the memory leaks reported by Erhard only started to > show up in 5.14 (if I read the bugzilla reports correctly), perhaps the > patch should simply be reverted on earlier kernels? > Yeah, I think this is probably the right approach. > > On which GPU do you see this problem? > > On an old GeForce 8500 GT, the whole PC is rather ancient. > > Cheers, > Sven >