Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp847477yba; Wed, 24 Apr 2019 10:33:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqzY2Nns9rsR4gdIhOMPHT34hlpmTwPLosNCxsKdSw4crWh52dVy5nIoWhseSZz7UfhcxGsm X-Received: by 2002:a62:3849:: with SMTP id f70mr34314756pfa.46.1556127196494; Wed, 24 Apr 2019 10:33:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556127196; cv=none; d=google.com; s=arc-20160816; b=X5dksPB6Ug1Z8NMST0601z97DBAnDhYHvP/49CzuyGKYYZYzX8cOefTgfRkmOkrduu aNfMKozEtEZfyqfrXYrl9n6pfz/RXlbPOyJfSx3PVKA4YIDuT7h8W+t96A3b2hDJM4TQ Ui5wJpaZqC3u7a0pVuImtNLdcAAeodmPRwtZp4iye26Sp0UPWLVFdkc2Tr4DuJJhA8WR BjALiYKhnAtWjw1WRVTsKssgtpGvJLeUYjxRNZWdM4/qRO+fHpeT61rnYZ+f1rDog8FQ 11H3qn0w4fXDBJpUafLpd+5QEeVcBPwQ1OFQ6ujFwj5fkAZzQp+3fxba7iw4WvZ8os1/ 0xUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=JmicCiWawhk9gq6UZtkMuoHaCKvbbEacHho2Dd6QDmQ=; b=VsP+y/xy5EBfwoux/EP52ajQ3I+83ME33Dn1jy288X4kzDN56O5XD0jl81moZceSmj houoVWQtmUR2WwYz1wMlM8EOPjXWSij7/VIhLZ5b+AuNCBx4NkwX87l3uZljqOxlj0g8 BMHqWNHRfihq1CwfzLd9YI23e1hGe5YWilX10shfWmfU2Jch0qItdRnGye95nDvsgvjn LpWhRkgtUv5LirIPZuZxwvotSjV45ocvnf/FWO/d+8TETVMocbtCAZLhlnmhwtEx3MBX R5s97ndu08bpjH4Lrb8PmyIfxQhD0NvC931UpDTKNh8uDqMHKp8TR13Xe3wmO3QBcxIf 7gew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=VCqxz4E4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e24si18121234pgh.403.2019.04.24.10.33.00; Wed, 24 Apr 2019 10:33:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=VCqxz4E4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2403809AbfDXRb1 (ORCPT + 99 others); Wed, 24 Apr 2019 13:31:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:57940 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403800AbfDXRb0 (ORCPT ); Wed, 24 Apr 2019 13:31:26 -0400 Received: from localhost (62-193-50-229.as16211.net [62.193.50.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 86C4A2054F; Wed, 24 Apr 2019 17:31:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1556127086; bh=WTFo0w6bOd6tgdW3iGcOXVW9Ghv3oBKHIqjkAWYOcRs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VCqxz4E4FahrN4A0OjcnlMX20Akvobi87oG7qiubgwAWP5O+TVDrCW9l/EZD69YHY YnXKgxD997bbNi5XtbxwgZSuisxNI2iFBaQ6PcLKe7Q6O6WzT4j+AEibO7hLWDsspt 7R+puzMoxYiLhmGoJffwGKJOZq23QmBg1bjUrS+U= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mikulas Patocka , Nicolas Pitre Subject: [PATCH 4.19 57/96] vt: fix cursor when clearing the screen Date: Wed, 24 Apr 2019 19:10:02 +0200 Message-Id: <20190424170923.599911313@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190424170919.829037226@linuxfoundation.org> References: <20190424170919.829037226@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mikulas Patocka commit b2ecf00631362a83744e5ec249947620db5e240c upstream. The patch a6dbe4427559 ("vt: perform safe console erase in the right order") introduced a bug. The conditional do_update_region() was replaced by a call to update_region() that does contain the conditional already, but with unwanted extra side effects such as restoring the cursor drawing. In order to reproduce the bug: - use framebuffer console with the AMDGPU driver - type "links" to start the console www browser - press 'q' and space to exit links Now the cursor will be permanently visible in the center of the screen. It will stay there until something overwrites it. The bug goes away if we change update_region() back to the conditional do_update_region(). [ nico: reworded changelog ] Signed-off-by: Mikulas Patocka Reviewed-by: Nicolas Pitre Cc: stable@vger.kernel.org Fixes: a6dbe4427559 ("vt: perform safe console erase in the right order") Signed-off-by: Greg Kroah-Hartman --- drivers/tty/vt/vt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/tty/vt/vt.c +++ b/drivers/tty/vt/vt.c @@ -1521,7 +1521,8 @@ static void csi_J(struct vc_data *vc, in return; } scr_memsetw(start, vc->vc_video_erase_char, 2 * count); - update_region(vc, (unsigned long) start, count); + if (con_should_update(vc)) + do_update_region(vc, (unsigned long) start, count); vc->vc_need_wrap = 0; }