summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin/stackcollapse-report
diff options
context:
space:
mode:
authorTATSUKAWA KOSUKE (立川 江介) <tatsu-ab1@nec.com>2022-01-26 23:35:02 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-01-31 14:31:28 +0100
commitc816b2e65b0e86b95011418cad334f0524fc33b8 (patch)
treed167dc27d2659fad2c2c92df172859f92ceb8096 /tools/perf/scripts/python/bin/stackcollapse-report
parent26291c54e111ff6ba87a164d85d4a4e134b7315c (diff)
downloadkernel-c816b2e65b0e86b95011418cad334f0524fc33b8.tar.gz
n_tty: wake up poll(POLLRDNORM) on receiving data
The poll man page says POLLRDNORM is equivalent to POLLIN when used as an event. $ man poll <snip> POLLRDNORM Equivalent to POLLIN. However, in n_tty driver, POLLRDNORM does not return until timeout even if there is terminal input, whereas POLLIN returns. The following test program works until kernel-3.17, but the test stops in poll() after commit 57087d515441 ("tty: Fix spurious poll() wakeups"). [Steps to run test program] $ cc -o test-pollrdnorm test-pollrdnorm.c $ ./test-pollrdnorm foo <-- Type in something from the terminal followed by [RET]. The string should be echoed back. ------------------------< test-pollrdnorm.c >------------------------ #include <stdio.h> #include <errno.h> #include <poll.h> #include <unistd.h> void main(void) { int n; unsigned char buf[8]; struct pollfd fds[1] = {{ 0, POLLRDNORM, 0 }}; n = poll(fds, 1, -1); if (n < 0) perror("poll"); n = read(0, buf, 8); if (n < 0) perror("read"); if (n > 0) write(1, buf, n); } ------------------------------------------------------------------------ The attached patch fixes this problem. Many calls to wake_up_interruptible_poll() in the kernel source code already specify "POLLIN | POLLRDNORM". Fixes: 57087d515441 ("tty: Fix spurious poll() wakeups") Cc: stable@vger.kernel.org Signed-off-by: Kosuke Tatsukawa <tatsu-ab1@nec.com> Link: https://lore.kernel.org/r/TYCPR01MB81901C0F932203D30E452B3EA5209@TYCPR01MB8190.jpnprd01.prod.outlook.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-report')
0 files changed, 0 insertions, 0 deletions
6929/1: SPEAr3xx: Append spear3** with global device structuresviresh kumar 2011-05-20ARM: 6930/1: SPEAr3xx: Rework pmx_dev code to remove conflictsRyan Mallon 2011-05-20ARM: 6935/1: SPEAR3xx: Rename register/irq defines to remove naming conflictsRyan Mallon 2011-05-20ARM: 6928/1: SPEAr3xx: Make local shirq structures staticRyan Mallon 2011-05-20ARM: 6927/1: SPEAr Clock: Update for single image solutionviresh kumar 2011-05-20ARM: 6926/1: SPEAr clock: Define common clk_init routine in plat/clock.cviresh kumar 2011-03-09ARM: 6794/1: SPEAr: Append UL to device address macros.Shiraz Hashim 2011-03-09ARM: 6793/1: SPEAr: Remove unused *_SIZE macros from spear*.h filesviresh kumar 2011-03-09ARM: 6792/1: SPEAr: Replace SIZE macro's with SZ_4K macrosviresh kumar 2011-03-09ARM: 6791/1: SPEAr3xx: Declare device structures after shirq codeviresh kumar 2011-03-09ARM: 6790/1: SPEAr: Clock Framework: Rename usbd clock and align apb_clk entryviresh kumar 2011-03-09ARM: 6789/1: SPEAr3xx: Rename sdio to sdhciviresh kumar 2011-03-09ARM: 6788/1: SPEAr: Include mach/hardware.h instead of mach/spear.hviresh kumar 2011-03-09ARM: 6787/1: SPEAr: Reorder #includes in .h & .c files.viresh kumar 2011-03-09ARM: 6703/1: SPEAr: update clk API supportviresh kumar 2011-03-09ARM: 6679/1: SPEAr: make clk API functions more genericviresh kumar 2011-03-09ARM: 6737/1: SPEAr: formalized timer supportShiraz Hashim 2011-03-09ARM: 6678/1: SPEAr: update padmux codeviresh kumar 2011-03-09ARM: 6677/1: SPEAr: add IOMEM(x) definition and update declaration of MISC_BASEviresh kumar 2011-02-21ARM: 6700/1: SPEAr: Correct SOC config base address for spear320viresh kumar 2010-11-01tree-wide: fix comment/printk typosUwe Kleine-König 2010-07-22ARM: AMBA: Add pclk definition for platforms using primecellsRussell King 2010-05-04ARM: 6091/1: ST SPEAr: Adding support for shared irq layerviresh kumar 2010-04-14ARM: 6020/1: ST SPEAr: Adding gpio pad multiplexing supportviresh kumar 2010-04-14ARM: 6017/1: ST SPEAr: Added source files for SPEAr3xx machine familyviresh kumar 2010-04-14ARM: 6014/1: ST SPEAr: Added clock framework for SPEAr platform and machinesviresh kumar 2010-04-14ARM: 6010/1: ST SPEAr: Added basic header files for SPEAr3xx machine familyviresh kumar