Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2353576pxb; Mon, 20 Sep 2021 19:52:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxhyxzT6j4wbLFegcHjT00KpnBGX5Fj8CCcDfHQ452bqaUQeI8g8Zx9Qi4neOvBQ3BCOByj X-Received: by 2002:a92:4406:: with SMTP id r6mr19290206ila.88.1632192723058; Mon, 20 Sep 2021 19:52:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632192723; cv=none; d=google.com; s=arc-20160816; b=niUfUrk5v6TaN4rRtqggNmvTadRysdpz88MJB0z3fDvVh7Luq4hxMLYj3b8vvHNebw oAFPI5Q8XcPyISPVKmfX2hl9YGAOcEwzuqLut/6FckYOzDmziXaGkix8PFbkft4a8zUk TqRlONETnBcI5OUI+3Qf/8oZyWUKGy4QY9K1tJcSCpMjPMhz3DA12XVdw68nCPxJ7Z4q ddANwAM0BR2JDXXgEgELRw1CWeR1Cf/t9s7TBX+5yiDG9XHcebBNWTyvtDdGGIWTMASc ZQoSlKxqXiUw8WkQJNtJRfiHKVHvkkQYC5mB1o+7uNRO+fQ4T1DYqCYxMoD/i7NVmWsB r6tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=yEQnqEJKF5C+hQWgaS0XJMe8DDR9cSEai46AoVr0L2Y=; b=R13jik5pRzLwLuEIi5uR/GwGu24ya+vlrsmrxALlgVf2K8SjCE4uk50QPSHNs0DARx 72G0jiwNmoGK7+dMGLi39Rd+PMovQMNcmdZAbmPw6unGoNs9HTR7slapZ93vUDqavKoa +USo114Jd0wNK4SF2FEYtiJ9UwRjUeeAztJVTJAzHHXU0M0CA7NJOHXL//v4BE8kKkDb b69HUtF5qvNkYoDw+3nXslAuoQUDj+vZ2kWIp8P7LKNZWdPmnuVfnnAKjvneL87nhuAf 284yMidbzZ+VDaVNVOQWyU4OziqJWUnZ0RTnVAVE9lwVxZlKxtULapVJTdydF8/6woEI Qo/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=kfyjebdx; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 18si10718597jak.85.2021.09.20.19.51.51; Mon, 20 Sep 2021 19:52:03 -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=@linuxfoundation.org header.s=korg header.b=kfyjebdx; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1383740AbhITSpm (ORCPT + 99 others); Mon, 20 Sep 2021 14:45:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:56460 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1382390AbhITSkX (ORCPT ); Mon, 20 Sep 2021 14:40:23 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 31BBF6333E; Mon, 20 Sep 2021 17:31:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632159072; bh=tCeyFsf4O3m0W2+fULiKO9x2K4EASmAoJvGUqQicM90=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kfyjebdxm4mS1ioWWCkYLVnezJH93zseOP43Lil+AM7JSdV5HNyHsozyGBPD1byny 0Ci7RmOU15/4IocS+kriw0Fnr3OUCCHhHdJMkacqta0m43ygBTbD6DQDFkYhL98lym ywj4JZPIxKeywEsnZBlPCdAMDQNgKf1W4ORdNYBY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lucas Stach , Michael Walle , Marek Vasut , Christian Gmeiner Subject: [PATCH 5.14 031/168] drm/etnaviv: add missing MMU context put when reaping MMU mapping Date: Mon, 20 Sep 2021 18:42:49 +0200 Message-Id: <20210920163922.670548883@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163921.633181900@linuxfoundation.org> References: <20210920163921.633181900@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Lucas Stach commit f2faea8b64125852fa9acc6771c07fc0311a039b upstream. When we forcefully evict a mapping from the the address space and thus the MMU context, the MMU context is leaked, as the mapping no longer points to it, so it doesn't get freed when the GEM object is destroyed. Add the mssing context put to fix the leak. Cc: stable@vger.kernel.org # 5.4 Signed-off-by: Lucas Stach Tested-by: Michael Walle Tested-by: Marek Vasut Reviewed-by: Christian Gmeiner Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/etnaviv/etnaviv_mmu.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/gpu/drm/etnaviv/etnaviv_mmu.c +++ b/drivers/gpu/drm/etnaviv/etnaviv_mmu.c @@ -199,6 +199,7 @@ static int etnaviv_iommu_find_iova(struc */ list_for_each_entry_safe(m, n, &list, scan_node) { etnaviv_iommu_remove_mapping(context, m); + etnaviv_iommu_context_put(m->context); m->context = NULL; list_del_init(&m->mmu_node); list_del_init(&m->scan_node);