Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp5991936ybc; Wed, 27 Nov 2019 13:03:03 -0800 (PST) X-Google-Smtp-Source: APXvYqwHC4yk2yIhGLkbe+/vjzIxERStmRaYHMN1LsEYvHQnvSIE7QzRe0DSIu4vMHcH0QjBhGj9 X-Received: by 2002:a17:906:131a:: with SMTP id w26mr2640386ejb.47.1574888583182; Wed, 27 Nov 2019 13:03:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574888583; cv=none; d=google.com; s=arc-20160816; b=of5KDF5Fi567m1Bvvs/gXon67knihqyhF3E6aJ1ehjtgwFJNicsCpW/EmCHQgTZN5M o6TJA79+0w8Pzywdk7Q68tIsUe4GStyxvL0yFPiLx/mG6LRIWMt4oRR0r73gmarAvwli piS/hP/J0tyGOjdBAe8WrZL5+JzTn11pNecTd/fZ/34WisKEalUajW06NIIrrFxiWHAw OKsnJtmbjIupdkoeLo4fGtfE1/KsXY4RihLwDixDCRNjUEwuBopPbvk04kMR29uDlnvG kRpHvBmZJuEgGaP7e0U7NyCfcGQZWn9np1+o0Cz+dhX74psmY1ucgEEgeVhN2O9Ei7IY a9Ww== 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=bpr18FOj9szHkjuCXoA7sDOThkz4zLA17yZDxqRdKWU=; b=CaoXw3mgaGX4IjzBkhxEqw1tOi4vUpgjMYfLTT2qRL3sCgUEMJHX+9zDOCTnySObk0 V/54CpWtKKPiuWHeloi4JUU5186iPL6p8HKb6Uy42YvrJH32Ys0+14KIzkOexA7BxHni aK9KfUU93PcsTTsCxHNJtW7fq3shNBcWwCGEORhmG/MlUMx6bU0Zjp7vGRfPdkjzRWyf ntZeIc/l/S8mmW5HLH4ug8E44PrUdlDzms+7cIOgAze/3Vy5QC7ANkXOttSLSmwchfZb oS6nshE9PnQCGiqigxwD+FbFIrpVYiJau36JTyLEqIxLiaJpmZZJwfTdQXU130KIbthF wmmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=g8AOUDNm; 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 ch20si3917110ejb.14.2019.11.27.13.02.32; Wed, 27 Nov 2019 13:03:03 -0800 (PST) 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=g8AOUDNm; 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 S1731761AbfK0VBh (ORCPT + 99 others); Wed, 27 Nov 2019 16:01:37 -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