From patchwork Fri Jun 23 10:39:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 9806239 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A3DE560349 for ; Fri, 23 Jun 2017 10:43:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 949B428740 for ; Fri, 23 Jun 2017 10:43:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 893CD28746; Fri, 23 Jun 2017 10:43:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2E70028744 for ; Fri, 23 Jun 2017 10:43:07 +0000 (UTC) Received: from localhost ([::1]:34741 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dOM3O-0004YG-CL for patchwork-qemu-devel@patchwork.kernel.org; Fri, 23 Jun 2017 06:43:06 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34424) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dOM0F-0002nm-S7 for qemu-devel@nongnu.org; Fri, 23 Jun 2017 06:39:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dOM0C-00055J-3B for qemu-devel@nongnu.org; Fri, 23 Jun 2017 06:39:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50660) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dOM0B-000548-U7; Fri, 23 Jun 2017 06:39:48 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C403319D387; Fri, 23 Jun 2017 10:39:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com C403319D387 Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kraxel@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com C403319D387 Received: from sirius.home.kraxel.org (ovpn-116-101.ams2.redhat.com [10.36.116.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id 873156EC60; Fri, 23 Jun 2017 10:39:42 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id DA54D41ABE; Fri, 23 Jun 2017 12:39:45 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Fri, 23 Jun 2017 12:39:40 +0200 Message-Id: <20170623103945.7014-3-kraxel@redhat.com> In-Reply-To: <20170623103945.7014-1-kraxel@redhat.com> References: <20170623103945.7014-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Fri, 23 Jun 2017 10:39:44 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 2/7] input: Decrement queue count on kbd delay X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gerd Hoffmann , Alexander Graf , qemu-stable@nongnu.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Alexander Graf Delays in the input layer are special cased input events. Every input event is accounted for in a global intput queue count. The special cased delays however did not get removed from the queue, leading to queue overruns and thus silent key drops after typing quite a few characters. Signed-off-by: Alexander Graf Message-id: 1498117318-162102-1-git-send-email-agraf@suse.de Fixes: be1a7176 ("input: add support for kbd delays") Cc: qemu-stable@nongnu.org Signed-off-by: Gerd Hoffmann --- ui/input.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/input.c b/ui/input.c index 2abd46de93..af05f06368 100644 --- a/ui/input.c +++ b/ui/input.c @@ -256,6 +256,7 @@ static void qemu_input_queue_process(void *opaque) item = QTAILQ_FIRST(queue); g_assert(item->type == QEMU_INPUT_QUEUE_DELAY); QTAILQ_REMOVE(queue, item, node); + queue_count--; g_free(item); while (!QTAILQ_EMPTY(queue)) {