Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2483314pxj; Mon, 10 May 2021 04:11:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFluLAWeGEoE1CQzVWWkf5QlvL/AFNchHw6JgRiy/wjgI3PM54tr+oItB7z9HD6DwsDgUn X-Received: by 2002:a17:906:60d6:: with SMTP id f22mr25267279ejk.177.1620645074884; Mon, 10 May 2021 04:11:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620645074; cv=none; d=google.com; s=arc-20160816; b=UyraIqBevVR9U82MTdSACs3qk6oS0fmUELYsS6hLnQpuWYeKIEKBfDNjDF2LKSBzuU A90IkkvjQysFZXzTH+O+BWTwRH4Nkv+GFOMycEpgz2D/hh8spWHDL5M+L0eIDt8ZPasD tA9LE+ht+MAdnoZEGNnPv9sOZIq1w4f92UKa/48Fi9U9mOnJthC8MtUMTU20Uurgbc7T yTdZ0om1rcT2zg2pK8P7sC1y0UXH9t+xfwqbRh06ZclZxsoH9eqaoXhPrPklqOE8iMu9 hnDVhWrUMyZGNh+bQbQMXB42Opyr65oUq4pGJbWRybjhwva1XfSIB5rPe3XshVqbY6xz IyIw== 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=mN/WA3tyJNczcSF7U5ht9uE+lGHjfLo3HtU+ObzBL0M=; b=VjRBiD9CZuNFnhyFRQKl1PVt75bUhQzcDsDMRoLwo7310IXXXr0bktocNApTkfQXRI VPFPcnLqoPcBwuilhBGBR6TGEUlRveR6UhnnrDEeUimqemu232jdfCKzqbXoWJh4EtEI g0rljCjbm3cdIV6l13U/EzM7ySaUoeTJESxyf96JfQvaJ6HD23oMEfpZJbALNmxvzWbS VDey9S5sE5R/mQQvpDUar1bP06z9JlSMHJkjt3JQAgGla8vVF+YEIKLULaCV7pl7Zrxs 1INPMrnvfaor5aQqUoyF6rukV0ipJJLgx2ERAv9Nv/NCIWbs8YOwtY71J553Nhhys00B YyhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=sTWutlq9; 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 s27si14131756edy.9.2021.05.10.04.10.51; Mon, 10 May 2021 04:11:14 -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=sTWutlq9; 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 S236031AbhEJLHT (ORCPT + 99 others); Mon, 10 May 2021 07:07:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:58292 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233420AbhEJKqb (ORCPT ); Mon, 10 May 2021 06:46:31 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7858861458; Mon, 10 May 2021 10:37:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620643033; bh=BDZsQZwC4C1fqBMdlxZ9PI+d1PKZotm8EjjbhzH/qS8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sTWutlq9mE8KVtFsbBPZgk/C55KFhdbExD3Lds0QwE4kzJDUMNvLdbCotAcKy9o/P QkBI1tOEuLnNo1XFMoVfjUegYGGnvgmXGzSNBe1HaigupKjr8kTdpFhirVO1GS/Y3C 7eHXTU7U3oMl5z76CZtkuQa/3blcsQzPyxJYCrhQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dmitry Vyukov , syzbot+4fc21a003c8332eb0bdd@syzkaller.appspotmail.com, Rodrigo Siqueira , Melissa Wen , Haneen Mohammed , Daniel Vetter , David Airlie , dri-devel@lists.freedesktop.org, Sasha Levin Subject: [PATCH 5.10 149/299] drm/vkms: fix misuse of WARN_ON Date: Mon, 10 May 2021 12:19:06 +0200 Message-Id: <20210510102009.882015233@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210510102004.821838356@linuxfoundation.org> References: <20210510102004.821838356@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: Dmitry Vyukov [ Upstream commit b4142fc4d52d051d4d8df1fb6c569e5b445d369e ] vkms_vblank_simulate() uses WARN_ON for timing-dependent condition (timer overrun). This is a mis-use of WARN_ON, WARN_ON must be used to denote kernel bugs. Use pr_warn() instead. Signed-off-by: Dmitry Vyukov Reported-by: syzbot+4fc21a003c8332eb0bdd@syzkaller.appspotmail.com Cc: Rodrigo Siqueira Cc: Melissa Wen Cc: Haneen Mohammed Cc: Daniel Vetter Cc: David Airlie Cc: dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org Acked-by: Melissa Wen Signed-off-by: Melissa Wen Link: https://patchwork.freedesktop.org/patch/msgid/20210320132840.1315853-1-dvyukov@google.com Signed-off-by: Sasha Levin --- drivers/gpu/drm/vkms/vkms_crtc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vkms/vkms_crtc.c b/drivers/gpu/drm/vkms/vkms_crtc.c index 09c012d54d58..1ae5cd47d954 100644 --- a/drivers/gpu/drm/vkms/vkms_crtc.c +++ b/drivers/gpu/drm/vkms/vkms_crtc.c @@ -18,7 +18,8 @@ static enum hrtimer_restart vkms_vblank_simulate(struct hrtimer *timer) ret_overrun = hrtimer_forward_now(&output->vblank_hrtimer, output->period_ns); - WARN_ON(ret_overrun != 1); + if (ret_overrun != 1) + pr_warn("%s: vblank timer overrun\n", __func__); spin_lock(&output->lock); ret = drm_crtc_handle_vblank(crtc); -- 2.30.2