From mboxrd@z Thu Jan 1 00:00:00 1970 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=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,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 1E04DC432C0 for ; Wed, 27 Nov 2019 21:01:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E4B992158C for ; Wed, 27 Nov 2019 21:01:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574888500; bh=DYDeOGRcI4kuQWrRA6hmaepxNa+IRLppnQKcvt38DBs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=YJwg7NHy8VHSRRSpUtV+TG6YLt/EhUzZlpsdeaFagtVuecjOxOvyONmpnBsY/bYtb 5xK0cWHHCmLmeWdwDUZ41LoAwenh74uKFy597x78Un0/EtreySF5mGY/y3o1NGvle5 199AIZ0VfCpZ0A6KFmtQwqx5IW8ZxcmsiiWJQsiA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731763AbfK0VBi (ORCPT ); Wed, 27 Nov 2019 16:01:38 -0500 Received: from mail.kernel.org ([198.145.29.99]:53932 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727329AbfK0VBe (ORCPT ); Wed, 27 Nov 2019 16:01:34 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 68EA321555; Wed, 27 Nov 2019 21:01:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574888493; bh=DYDeOGRcI4kuQWrRA6hmaepxNa+IRLppnQKcvt38DBs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=g8AOUDNm0mbPfJGMVJdFqfnmYF1NXDdHerdx4t2ZImqbECZE7KxleR/5biZOJ/2cZ 4JMQ3oYmLN4rwF+c13outc+cmdJ602ZQ3125cF/JsJ7jeQkHB9yiqEMhAXrQpz+ToZ szw42nDdzxs03zhfW8TWxwMBCJj0DEzfah1mseyU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Anton Ivanov , Richard Weinberger , Sasha Levin Subject: [PATCH 4.19 157/306] um: Make line/tty semantics use true write IRQ Date: Wed, 27 Nov 2019 21:30:07 +0100 Message-Id: <20191127203127.050884230@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203114.766709977@linuxfoundation.org> References: <20191127203114.766709977@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: Anton Ivanov [ Upstream commit 917e2fd2c53eb3c4162f5397555cbd394390d4bc ] This fixes a long standing bug where large amounts of output could freeze the tty (most commonly seen on stdio console). While the bug has always been there it became more pronounced after moving to the new interrupt controller. The line semantics are now changed to have true IRQ write semantics which should further improve the tty/line subsystem stability and performance Signed-off-by: Anton Ivanov Signed-off-by: Richard Weinberger Signed-off-by: Sasha Levin --- arch/um/drivers/line.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c index 8d80b27502e6a..7e524efed5848 100644 --- a/arch/um/drivers/line.c +++ b/arch/um/drivers/line.c @@ -261,7 +261,7 @@ static irqreturn_t line_write_interrupt(int irq, void *data) if (err == 0) { spin_unlock(&line->lock); return IRQ_NONE; - } else if (err < 0) { + } else if ((err < 0) && (err != -EAGAIN)) { line->head = line->buffer; line->tail = line->buffer; } @@ -284,7 +284,7 @@ int line_setup_irq(int fd, int input, int output, struct line *line, void *data) if (err) return err; if (output) - err = um_request_irq(driver->write_irq, fd, IRQ_NONE, + err = um_request_irq(driver->write_irq, fd, IRQ_WRITE, line_write_interrupt, IRQF_SHARED, driver->write_irq_name, data); return err; -- 2.20.1