Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp117108pxf; Wed, 24 Mar 2021 23:09:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzqVhCXdqdyzfgtoQs+i9cWvhdze9FIuNmh91IjVQojSSUX72xeFD1XXJJ0+0IKw+zUaz3q X-Received: by 2002:aa7:c346:: with SMTP id j6mr7205735edr.386.1616652568867; Wed, 24 Mar 2021 23:09:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616652568; cv=none; d=google.com; s=arc-20160816; b=kxDYbINKC4Y2zpj95NtPKtdWmEFuJXiQbhKL8MtCK2XLWdRPIVAT26piPefiS4i18M a6aaRgp2zCRBRtZlLfz/GB94BDlXo+bNYGR+hAIdp07cEBKamIGI1rl9pdeUOLW0JgZB y79q49VEAhBQsvdDkLlFfT1TnSVkfK7SJ019edN0VFLRkXhfMi2dajTYx9pQIeKCM4TG jaaBAnlu9RmiGryZOPUvbCfqwCNd3fkeQo4RictjsMwhpQ4JDZ8hA3u5SdkXl/QahM9O xzi1myrMOCroYmhY4xi3wP08C3kSZG2WIICs2cYhb//wQ90TSXe1PFcX4YKmUtNBMnn2 fcoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :to:subject; bh=s6Rh06bLKurdDzEX1b/1bst0k4OsTwDXkHOAr1RY5jQ=; b=Nv8sIfDfysCmJOYMMC7FFytwMqsUYlhFUKSkSkNPit0hPgbv50jHYUTMCMpmc5AD3V E6Ac46TzArocGWxd2vP8J66GsRefNhFtlarfliLkx07DRnyCXPbIpXaLv5rIl8i6Wtos JFGhu0dpavm/hq1o/2caMbcgoETIgqB1zy9PxC40sjcdPQBwRGUQd2YjMvFVwzZnAYPV MZjcnT9Vr7R9WpN3WIvH6yB2IZ3+wt3LvEY0khmlY+TW5WD5su2QddFtlbiU/t2yR84m FVTwoVxLJ2he7AD4ItuJEBucgtGtaDLdnlYEkcHik9ioRuMyP3jx3XWPKW8BBopxXza8 FLPQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=inet.fi Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k4si3205418edq.442.2021.03.24.23.09.06; Wed, 24 Mar 2021 23:09:28 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=inet.fi Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229693AbhCYGEV (ORCPT + 99 others); Thu, 25 Mar 2021 02:04:21 -0400 Received: from mta-out1.inet.fi ([62.71.2.194]:41562 "EHLO julia1.inet.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229547AbhCYGDy (ORCPT ); Thu, 25 Mar 2021 02:03:54 -0400 X-Greylist: delayed 365 seconds by postgrey-1.27 at vger.kernel.org; Thu, 25 Mar 2021 02:03:53 EDT X-RazorGate-Vade-Verdict: clean 0 X-RazorGate-Vade-Classification: clean X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgeduledrudegledgkeekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuuffpveftnecuuegrihhlohhuthemuceftddtnecunecujfgurhepuffvfhfhkffffgggjggtgfesthejredttdefjeenucfhrhhomhepkfhlkhhkrgcurfhruhhsihcuoehilhhkkhgrrdhprhhushhisehpphdrihhnvghtrdhfiheqnecuggftrfgrthhtvghrnhepvddtgeduiefgkeejfedvhefgledugffhheejgfehgeffhfegueelvdefvdevieefnecukfhppeekgedrvdehuddrudelgedrudeigeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhephhgvlhhopegludelvddrudeikedruddrjeeingdpihhnvghtpeekgedrvdehuddrudelgedrudeigedpmhgrihhlfhhrohhmpeeophhruhhsihhlqddusehmsghogidrihhnvghtrdhfihequceuqfffjgepkeeukffvoffkoffgpdhrtghpthhtohepoehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrgheq Received: from [192.168.1.76] (84.251.194.164) by julia1.inet.fi (9.0.019.26-1) (authenticated as prusil-1) id 605B47EE00035105 for linux-kernel@vger.kernel.org; Thu, 25 Mar 2021 07:57:34 +0200 Subject: Re: WARNING: AMDGPU DRM warning in 5.11.9 To: linux-kernel@vger.kernel.org References: From: Ilkka Prusi Message-ID: Date: Thu, 25 Mar 2021 07:57:33 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 24.3.2021 16.16, Chris Rankin wrote: > Hi, > > Theee warnings ares not present in my dmesg log from 5.11.8: > > [ 43.390159] ------------[ cut here ]------------ > [ 43.393574] WARNING: CPU: 2 PID: 1268 at > drivers/gpu/drm/ttm/ttm_bo.c:517 ttm_bo_release+0x172/0x282 [ttm] > [ 43.401940] Modules linked in: nf_nat_ftp nf_conntrack_ftp cfg80211 Changing WARN_ON to WARN_ON_ONCE in drivers/gpu/drm/ttm/ttm_bo.c ttm_bo_release() reduces the flood of messages into single splat. This warning appears to come from 57fcd550eb15bce ("drm/ttm: Warn on pinning without holding a reference)" and reverting it might be one choice. > > There are others, but I am assuming there is a common cause here. > > Cheers, > Chris > diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index a76eb2c14e8c..50b53355b265 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -514,7 +514,7 @@ static void ttm_bo_release(struct kref *kref) * shrinkers, now that they are queued for * destruction. */ - if (WARN_ON(bo->pin_count)) { + if (WARN_ON_ONCE(bo->pin_count)) { bo->pin_count = 0; ttm_bo_del_from_lru(bo); ttm_bo_add_mem_to_lru(bo, &bo->mem); -- - Ilkka