From patchwork Fri Apr 9 09:53:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 418791 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BC2D1C433ED for ; Fri, 9 Apr 2021 09:57:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 85EBF6103E for ; Fri, 9 Apr 2021 09:57:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233493AbhDIJ5Y (ORCPT ); Fri, 9 Apr 2021 05:57:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:44726 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233655AbhDIJ4c (ORCPT ); Fri, 9 Apr 2021 05:56:32 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A14016115C; Fri, 9 Apr 2021 09:56:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1617962179; bh=i9H08rKNPCDFCto/eGhd+dFQRD9tjWlncXUq4Ng5sjs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RQBULByKRtYOwIlukzvq0URB+Y9p1ldNRviU7HpZgDpkIQqVhVXfCPstkRZo5dijH 17mDhBUEsmExYrl4mDet1d7DA2cdKQkI73an7OMuoA8dLrAQEPFMC9Zf+JCEvOspTj KtjaThyGOYHiE5dc+hrWPUgd7jJH8KUHFjepCBtI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Rob Clark , Douglas Anderson , Sasha Levin Subject: [PATCH 4.14 05/14] drm/msm: Ratelimit invalid-fence message Date: Fri, 9 Apr 2021 11:53:30 +0200 Message-Id: <20210409095300.567414904@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210409095300.391558233@linuxfoundation.org> References: <20210409095300.391558233@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Rob Clark [ Upstream commit 7ad48d27a2846bfda29214fb454d001c3e02b9e7 ] We have seen a couple cases where low memory situations cause something bad to happen, followed by a flood of these messages obscuring the root cause. Lets ratelimit the dmesg spam so that next time it happens we don't lose the kernel traces leading up to this. Signed-off-by: Rob Clark Reviewed-by: Douglas Anderson Signed-off-by: Sasha Levin --- drivers/gpu/drm/msm/msm_fence.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/msm_fence.c b/drivers/gpu/drm/msm/msm_fence.c index a2f89bac9c16..4c0ac0360b93 100644 --- a/drivers/gpu/drm/msm/msm_fence.c +++ b/drivers/gpu/drm/msm/msm_fence.c @@ -56,7 +56,7 @@ int msm_wait_fence(struct msm_fence_context *fctx, uint32_t fence, int ret; if (fence > fctx->last_fence) { - DRM_ERROR("%s: waiting on invalid fence: %u (of %u)\n", + DRM_ERROR_RATELIMITED("%s: waiting on invalid fence: %u (of %u)\n", fctx->name, fence, fctx->last_fence); return -EINVAL; }