Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 879DDC433EF for ; Wed, 10 Nov 2021 10:29:52 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 504F0610A8 for ; Wed, 10 Nov 2021 10:29:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 504F0610A8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 18B476EABE; Wed, 10 Nov 2021 10:29:51 +0000 (UTC) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by gabe.freedesktop.org (Postfix) with ESMTPS id 825B06EABE; Wed, 10 Nov 2021 10:29:49 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6200,9189,10163"; a="213373003" X-IronPort-AV: E=Sophos;i="5.87,223,1631602800"; d="scan'208";a="213373003" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Nov 2021 02:29:40 -0800 X-IronPort-AV: E=Sophos;i="5.87,223,1631602800"; d="scan'208";a="534005231" Received: from mpolgar-mobl.ger.corp.intel.com (HELO [10.213.234.161]) ([10.213.234.161]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Nov 2021 02:29:38 -0800 Message-ID: Date: Wed, 10 Nov 2021 10:29:36 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: [PATCH] drm/i915/ttm: Fix illegal addition to shrinker list Content-Language: en-GB To: =?UTF-8?Q?Thomas_Hellstr=c3=b6m?= , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org References: <20211110085527.1033475-1-thomas.hellstrom@linux.intel.com> From: Matthew Auld In-Reply-To: <20211110085527.1033475-1-thomas.hellstrom@linux.intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On 10/11/2021 08:55, Thomas Hellström wrote: > There's a small window of opportunity during which the adjust_lru() > function can be called with a GEM refcount of zero from the TTM > eviction code. This results in a kernel BUG(). > > Ensure that we don't attempt to modify the GEM shrinker lists unless > we have a GEM refcount. > > Fixes: ebd4a8ec7799 ("drm/i915/ttm: move shrinker management into adjust_lru") > Signed-off-by: Thomas Hellström Reviewed-by: Matthew Auld