From patchwork Sun Oct 23 18:31:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grazvydas Ignotas X-Patchwork-Id: 9391149 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 66FB260762 for ; Sun, 23 Oct 2016 18:32:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 594A728B2A for ; Sun, 23 Oct 2016 18:32:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4DBC628B2E; Sun, 23 Oct 2016 18:32:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 10F0428B2A for ; Sun, 23 Oct 2016 18:32:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A795B6E1B0; Sun, 23 Oct 2016 18:32:02 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf0-x243.google.com (mail-lf0-x243.google.com [IPv6:2a00:1450:4010:c07::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id A74796E07E; Sun, 23 Oct 2016 18:31:56 +0000 (UTC) Received: by mail-lf0-x243.google.com with SMTP id n3so1762272lfn.0; Sun, 23 Oct 2016 11:31:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=lhmb8GO4BzVMfl0D1uSZfLDpvj1DUL5BFLzP4vaO7dg=; b=EoYqZG1L7KmjP9GZdJq5FDxQ12B5vKc7ya2Q2Kcxj5/5diCdlHZetGPo3HYCvaXVHt 8tOzREgxoebKPT3sI5mcLVHgJyGZBZ08CfcUSx+L5HV61d7Twd6yfEZsF75Rgzz307CR vnw0IgEXknV3vsnPBliTBVNQn12CtKKYzIvnuci7m7IsmZ4eEFeHrQhxPOKyp8segiqH XGqm3xRhcOuqz+TExKDCtvPa6czZ8v8m8/mJNe486NsyrFveyG8Pe9TUlL0dPxb0hCxw blav95mUFJM6VQvC35zc2PGycFhvgiXf/tK+ijetXaKD3P97RP6NNu9bkrlPHR6jy7Kh ggcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=lhmb8GO4BzVMfl0D1uSZfLDpvj1DUL5BFLzP4vaO7dg=; b=NNEy9v9LfR7UfrFnzuvMa+Xk0RH+MS8dyUnJh84EBa4ini4djZpjTYjYuVBDkqDWAj vSSJTxXXnzpEjnyyxfo/w+S63kigNx1kpJILWXIpNREU6WlPWdgfmBkh8kgzIGhTeonc srjO1pgK3BspacBdOmtNL0IRIYRoq23if5eLXjrof1Po11bJXnvcKptCUZVkvhWe2+56 Ub4/MHx53Sm4VW9CukFEswoiSkOvuIIvITNK+jhGNKZn03MAXs8hZuJhc6d3V9KlwLGg vliIL6/QbrdcNctR3Suo/7VY7XjfTD5uDOj4f0rUm8G00dEmzpycWByZBhhqJ8YhYtg+ AyVg== X-Gm-Message-State: ABUngvctJE56eIqxPfDlTS7VGP/Kx+Cww/4X4lf7Amu5SivUGbUlU6u174HjdrAh31rIDQ== X-Received: by 10.25.207.84 with SMTP id f81mr3917657lfg.155.1477247514752; Sun, 23 Oct 2016 11:31:54 -0700 (PDT) Received: from localhost.localdomain ([5.20.238.37]) by smtp.gmail.com with ESMTPSA id 79sm2362855lja.16.2016.10.23.11.31.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 23 Oct 2016 11:31:54 -0700 (PDT) From: Grazvydas Ignotas To: dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org Subject: [PATCH] drm/amdgpu: release parent fence reference Date: Sun, 23 Oct 2016 21:31:46 +0300 Message-Id: <1477247507-11378-4-git-send-email-notasas@gmail.com> X-Mailer: git-send-email 2.7.4 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP It's done in amd_sched_hw_job_reset(), but not in normal job processing. Leak reported by CONFIG_SLUB_DEBUG. Signed-off-by: Grazvydas Ignotas --- CONFIG_SLUB_DEBUG reports more leaks related to ioctls, but I was unable to track them down... drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c index 910b8d5..cfb686e 100644 --- a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c +++ b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c @@ -522,6 +522,8 @@ static void amd_sched_process_job(struct fence *f, struct fence_cb *cb) trace_amd_sched_process_job(s_fence); fence_put(&s_fence->finished); + fence_put(s_fence->parent); + s_fence->parent = NULL; wake_up_interruptible(&sched->wake_up_worker); }