Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp287383imu; Tue, 8 Jan 2019 20:04:57 -0800 (PST) X-Google-Smtp-Source: ALg8bN6DFYjU4x+60f1gKSnU58SmGh8LmYsMX4c9gGgjGPly7VaRvh4sQeYS3dRiuFF8oBWFbko4 X-Received: by 2002:aa7:868f:: with SMTP id d15mr4344359pfo.225.1547006696962; Tue, 08 Jan 2019 20:04:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547006696; cv=none; d=google.com; s=arc-20160816; b=yNODcQDjsjhCpXMTKmwd23Sxv/9AbLbwxYEW/Ib3mDKwlmI/7JT36Vg/8p6EUhg2Wy YbkxrMrg5tedk1kmaiFzUzfsppx7YRGoSCmRu4GkO/OWNqOHkutB9Qc9GyvlrIp/buCy 9VkhhKydOHFTddakwbhdn5TxHKTtfwHaXbh0s/DpA3KGrr2kOBK50zb8B/Pjk6jhI6LN q6HmOY5nXFa5Mjc5ZRuM0SMtDuiAhyktZiQc6Ya4eA971KUsXDizQaHhwpsg1USfT8Az EKPs4TlumBQCRj3cVpe+Pd61A0+duUh3RgwkaL2DF4JsxCZEF4C2l01ch3vlC7FwrleO qXeQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Qy7ecYNlukhEFJ1qzRyH/ib5ioiLv914cTZEKVeuLFw=; b=yC8Y5fdgqvp77lEf5YH5wcKDIvDS4wgOzVFAyt6ASWMb2HQKncg+aG9x+NwKD7aO31 Ok3Ue/E3tPiVt8eadcuOj/nLJ4XTWcjgIe4c2aKmPgiKx/U2/+EH4dMvHPPVQ+gxfznE 0phcr/VXIG8RATVCxhcQG0XeL2nKn//8uwQC/z4VAaVECeq151HmYa6et4fa1VCjuvRg 4qTBb5EP1IlniPHJ2qS4WoGiYMaEGjU9nAvkMVs5ucNNV2aJXGi4Jq3FWRpSm14NntFj 32YFoy8BTFrUTIZPvrJ1PTxW8UiHPORKQQX9ef2TiKQ6sJ201VG8B7C+mGlIdy4/ScOU 4nSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pobox.com header.s=sasl header.b=a3lYeLFy; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 37si8865824pgs.447.2019.01.08.20.04.41; Tue, 08 Jan 2019 20:04:56 -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=@pobox.com header.s=sasl header.b=a3lYeLFy; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729393AbfAIEBx (ORCPT + 99 others); Tue, 8 Jan 2019 23:01:53 -0500 Received: from pb-smtp21.pobox.com ([173.228.157.53]:59751 "EHLO pb-smtp21.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728483AbfAIEBw (ORCPT ); Tue, 8 Jan 2019 23:01:52 -0500 X-Greylist: delayed 360 seconds by postgrey-1.27 at vger.kernel.org; Tue, 08 Jan 2019 23:01:51 EST Received: from pb-smtp21.pobox.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 20A1E4D5FF; Tue, 8 Jan 2019 22:55:51 -0500 (EST) (envelope-from nicolas.pitre@linaro.org) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; s=sasl; bh=zys7wzfBEXI8WLsQRJK2ztCU7 R8=; b=a3lYeLFy7EbcTJGngJRCZXzWIerFwm5osXoz1Caw0aMbhcPJ2HiS5BfLz duHedGMFUOFBCa4zLYEUX/9LOUVLRczB9jlubgg6cgLQjvb51pL/r2fVb/7JeAD2 2jCqLkU3LU+lzLEWkRuTbwx118uCUoK0cpzrSVPPMo30A+QKas= Received: from pb-smtp21.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 193254D5FE; Tue, 8 Jan 2019 22:55:51 -0500 (EST) (envelope-from nicolas.pitre@linaro.org) Received: from yoda.home (unknown [70.82.104.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp21.pobox.com (Postfix) with ESMTPSA id 1B1314D5FD; Tue, 8 Jan 2019 22:55:48 -0500 (EST) (envelope-from nicolas.pitre@linaro.org) Received: from xanadu.home (xanadu.home [192.168.2.2]) by yoda.home (Postfix) with ESMTP id 1562C2DA06F5; Tue, 8 Jan 2019 22:55:46 -0500 (EST) From: Nicolas Pitre To: Greg Kroah-Hartman Cc: Dave Mielke , linux-kernel@vger.kernel.org Subject: [PATCH 6/6] vcs: fasync(): make it consistent with poll() Date: Tue, 8 Jan 2019 22:55:04 -0500 Message-Id: <20190109035504.8413-7-nicolas.pitre@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190109035504.8413-1-nicolas.pitre@linaro.org> References: <20190109035504.8413-1-nicolas.pitre@linaro.org> MIME-Version: 1.0 X-Pobox-Relay-ID: 72BF9086-13C2-11E9-959D-90A5DACCD188-78420484!pb-smtp21.pobox.com Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We use POLLPRI not POLLIN to wait for data with poll() as there is never any incoming data stream per se. Let's use the same semantic with fasync() for consistency, including the fact that a vt may go away. No known user space ever relied on the SIGIO reason so far, let alone FASYNC, so the risk of breakage is pretty much nonexistent. Signed-off-by: Nicolas Pitre --- drivers/tty/vt/vc_screen.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/tty/vt/vc_screen.c b/drivers/tty/vt/vc_screen.c index 1bbe2a30cd..1d887113ff 100644 --- a/drivers/tty/vt/vc_screen.c +++ b/drivers/tty/vt/vc_screen.c @@ -93,9 +93,18 @@ vcs_notifier(struct notifier_block *nb, unsigned long = code, void *_param) struct vcs_poll_data *poll =3D container_of(nb, struct vcs_poll_data, notifier); int currcons =3D poll->cons_num; - - if (code !=3D VT_UPDATE && code !=3D VT_DEALLOCATE) + int fa_band; + + switch (code) { + case VT_UPDATE: + fa_band =3D POLL_PRI; + break; + case VT_DEALLOCATE: + fa_band =3D POLL_HUP; + break; + default: return NOTIFY_DONE; + } =20 if (currcons =3D=3D 0) currcons =3D fg_console; @@ -106,7 +115,7 @@ vcs_notifier(struct notifier_block *nb, unsigned long= code, void *_param) =20 poll->event =3D code; wake_up_interruptible(&poll->waitq); - kill_fasync(&poll->fasync, SIGIO, POLL_IN); + kill_fasync(&poll->fasync, SIGIO, fa_band); return NOTIFY_OK; } =20 --=20 2.20.1