From patchwork Wed May 27 12:42:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tetsuo Handa X-Patchwork-Id: 6489761 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 54822C0020 for ; Wed, 27 May 2015 12:42:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7E127206A9 for ; Wed, 27 May 2015 12:42:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7964920524 for ; Wed, 27 May 2015 12:42:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752884AbbE0Mmn (ORCPT ); Wed, 27 May 2015 08:42:43 -0400 Received: from www262.sakura.ne.jp ([202.181.97.72]:52649 "EHLO www262.sakura.ne.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751445AbbE0Mmk (ORCPT ); Wed, 27 May 2015 08:42:40 -0400 Received: from fsav204.sakura.ne.jp (fsav204.sakura.ne.jp [210.224.168.166]) by www262.sakura.ne.jp (8.14.5/8.14.5) with ESMTP id t4RCgOhp055164; Wed, 27 May 2015 21:42:24 +0900 (JST) (envelope-from penguin-kernel@I-love.SAKURA.ne.jp) Received: from www262.sakura.ne.jp (202.181.97.72) by fsav204.sakura.ne.jp (F-Secure/virusgw_smtp/412/fsav204.sakura.ne.jp); Wed, 27 May 2015 21:42:24 +0900 (JST) X-Virus-Status: clean(F-Secure/virusgw_smtp/412/fsav204.sakura.ne.jp) Received: from AQUA (softbank126227184186.bbtec.net [126.227.184.186]) (authenticated bits=0) by www262.sakura.ne.jp (8.14.5/8.14.5) with ESMTP id t4RCgOp7055161; Wed, 27 May 2015 21:42:24 +0900 (JST) (envelope-from penguin-kernel@I-love.SAKURA.ne.jp) To: lkml14@scotdoyle.com, pavel@ucw.cz, gregkh@linuxfoundation.org Cc: linux-fbdev@vger.kernel.org Subject: [PATCH] fbcon: Fix incorrect fbcon_del_cursor_timer calls. From: Tetsuo Handa Message-Id: <201505272142.JGF00513.VJHOOLMOFSQFtF@I-love.SAKURA.ne.jp> X-Mailer: Winbiff [Version 2.51 PL2] X-Accept-Language: ja,en,zh Date: Wed, 27 May 2015 21:42:27 +0900 Mime-Version: 1.0 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY, URIBL_SBL autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP >From f4976c5f9638633eb31a1c6dbe78861abf5c79c1 Mon Sep 17 00:00:00 2001 From: Tetsuo Handa Date: Wed, 27 May 2015 21:36:38 +0900 Subject: [PATCH] fbcon: Fix incorrect fbcon_del_cursor_timer calls. Commit 27a4c827c34a ("fbcon: use the cursor blink interval provided by vt") by error changed to unconditionally call fbcon_del_cursor_timer() at fbcon_cursor(). As a result, SysRq from keyboard started to hit WARN_ON(in_irq() && !tbase_get_irqsafe(timer->base)); at del_timer_sync(), making the system unusable due to message flooding. Signed-off-by: Tetsuo Handa --- drivers/video/console/fbcon.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index 05b1d1a..658c34b 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c @@ -1310,8 +1310,9 @@ static void fbcon_cursor(struct vc_data *vc, int mode) return; ops->cur_blink_jiffies = msecs_to_jiffies(vc->vc_cur_blink_ms); - fbcon_del_cursor_timer(info); - if (!(vc->vc_cursor_type & 0x10)) + if (vc->vc_cursor_type & 0x10) + fbcon_del_cursor_timer(info); + else fbcon_add_cursor_timer(info); ops->cursor_flash = (mode == CM_ERASE) ? 0 : 1;