From patchwork Wed Jul 28 15:02:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Bader X-Patchwork-Id: 1510895 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=W3gs2Gav; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GZcMz6svzz9sT6; Thu, 29 Jul 2021 01:02:39 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1m8l4u-00074v-Jt; Wed, 28 Jul 2021 15:02:36 +0000 Received: from smtp-relay-canonical-1.internal ([10.131.114.174] helo=smtp-relay-canonical-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1m8l4q-00073W-82 for kernel-team@lists.ubuntu.com; Wed, 28 Jul 2021 15:02:32 +0000 Received: from canonical.com (1.general.smb.uk.vpn [10.172.193.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPSA id F11F140080 for ; Wed, 28 Jul 2021 15:02:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1627484552; bh=AfCN7T5GChtgdBeX4zd+axoTshYuRCoH33jx0y46JPU=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=W3gs2GavPGWLpN3M3vvwYXsp7voOBLTD/vPBR17dBTG/jZroDhoKZgaJ5yV/zVjbR lTBG+6XVM55mNVccxH0lEnWdkfanKQOTUzF5pO6o3UP0NAEVv3Psvnn+1TznHJFpqc KqyEOXGGA6+Pq9der13KLsjPtFp9qwJBbPSTBD6eucS8/H+rhYXFw5HGCmG9CC/irE pTNi98Isk7GPKwhH3bXC2buQ9Nn+fVtLGRWKtxWuagvumgwHYhlmMV+TmAlHGdxUXP B5v56E4Tz3c5nD13wmrEjNPEYTFrENYYsB8PbmTEiQVppCrVmCG6zDH3Obqcg2ttqn 8WBJWl21J59kQ== From: Stefan Bader To: kernel-team@lists.ubuntu.com Subject: [PATCH 2/2] Revert "drm/amd/amdgpu: fix refcount leak" Date: Wed, 28 Jul 2021 17:02:30 +0200 Message-Id: <20210728150230.150985-3-stefan.bader@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210728150230.150985-1-stefan.bader@canonical.com> References: <20210728150230.150985-1-stefan.bader@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" This reverts commit 6c0065eb69de90d50186c04f51ffe889e5bbe037. The 4.19.y series which this patch comes from has a previous change which is not in bionic which stores GEM info in the framebuffer. Suspecting that due to this we actually have no refcount leak in our kernel. Signed-off-by: Stefan Bader Acked-by: Krzysztof Kozlowski --- drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c index cf001bb4adb6..90fa8e8bc6fb 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c @@ -292,13 +292,10 @@ void amdgpu_fb_output_poll_changed(struct amdgpu_device *adev) static int amdgpu_fbdev_destroy(struct drm_device *dev, struct amdgpu_fbdev *rfbdev) { struct amdgpu_framebuffer *rfb = &rfbdev->rfb; - int i; drm_fb_helper_unregister_fbi(&rfbdev->helper); if (rfb->obj) { - for (i = 0; i < rfb->base.format->num_planes; i++) - drm_gem_object_put(rfb->obj); amdgpufb_destroy_pinned_object(rfb->obj); rfb->obj = NULL; drm_framebuffer_unregister_private(&rfb->base);