<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/tty, branch v4.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.2</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2015-07-24T01:08:29Z</updated>
<entry>
<title>tty: vt: Fix !TASK_RUNNING diagnostic warning from paste_selection()</title>
<updated>2015-07-24T01:08:29Z</updated>
<author>
<name>Peter Hurley</name>
<email>peter@hurleysoftware.com</email>
</author>
<published>2015-07-13T00:47:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=61e86cc90af49cecef9c54ccea1f572fbcb695ac'/>
<id>urn:sha1:61e86cc90af49cecef9c54ccea1f572fbcb695ac</id>
<content type='text'>
Pasting text with gpm on a VC produced warning [1]. Reset task state
to TASK_RUNNING in the paste_selection() loop, if the loop did not
sleep.

[1]
WARNING: CPU: 6 PID: 1960 at /home/peter/src/kernels/mainline/kernel/sched/core.c:7286 __might_sleep+0x7f/0x90()
do not call blocking ops when !TASK_RUNNING; state=1 set at [&lt;ffffffff8151805e&gt;] paste_selection+0x9e/0x1a0
Modules linked in: btrfs xor raid6_pq ufs qnx4 hfsplus hfs minix ntfs msdos jfs xfs libcrc32c .....
CPU: 6 PID: 1960 Comm: gpm Not tainted 4.1.0-rc7+tty-xeon+debug #rc7+tty
Hardware name: Dell Inc. Precision WorkStation T5400  /0RW203, BIOS A11 04/30/2012
 ffffffff81c9c0a0 ffff8802b0fd3ac8 ffffffff8185778a 0000000000000001
 ffff8802b0fd3b18 ffff8802b0fd3b08 ffffffff8108039a ffffffff82ae8510
 ffffffff81c9ce00 0000000000000015 0000000000000000 0000000000000000
Call Trace:
 [&lt;ffffffff8185778a&gt;] dump_stack+0x4f/0x7b
 [&lt;ffffffff8108039a&gt;] warn_slowpath_common+0x8a/0xc0
 [&lt;ffffffff81080416&gt;] warn_slowpath_fmt+0x46/0x50
 [&lt;ffffffff810ddced&gt;] ? __lock_acquire+0xe2d/0x13a0
 [&lt;ffffffff8151805e&gt;] ? paste_selection+0x9e/0x1a0
 [&lt;ffffffff8151805e&gt;] ? paste_selection+0x9e/0x1a0
 [&lt;ffffffff810ad4ff&gt;] __might_sleep+0x7f/0x90
 [&lt;ffffffff8185f76a&gt;] down_read+0x2a/0xa0
 [&lt;ffffffff810bb1d8&gt;] ? sched_clock_cpu+0xb8/0xe0
 [&lt;ffffffff8150d1dc&gt;] n_tty_receive_buf_common+0x4c/0xba0
 [&lt;ffffffff810dc875&gt;] ? mark_held_locks+0x75/0xa0
 [&lt;ffffffff81861c95&gt;] ? _raw_spin_unlock_irqrestore+0x65/0x80
 [&lt;ffffffff810b49a1&gt;] ? get_parent_ip+0x11/0x50
 [&lt;ffffffff8150dd44&gt;] n_tty_receive_buf2+0x14/0x20
 [&lt;ffffffff81518117&gt;] paste_selection+0x157/0x1a0
 [&lt;ffffffff810b77b0&gt;] ? wake_up_state+0x20/0x20
 [&lt;ffffffff815203f8&gt;] tioclinux+0xb8/0x2c0
 [&lt;ffffffff81515bfe&gt;] vt_ioctl+0xaee/0x11a0
 [&lt;ffffffff810baf75&gt;] ? sched_clock_local+0x25/0x90
 [&lt;ffffffff810bbe11&gt;] ? vtime_account_user+0x91/0xa0
 [&lt;ffffffff8150810c&gt;] tty_ioctl+0x20c/0xe20
 [&lt;ffffffff810bbe11&gt;] ? vtime_account_user+0x91/0xa0
 [&lt;ffffffff810b49a1&gt;] ? get_parent_ip+0x11/0x50
 [&lt;ffffffff810b4a69&gt;] ? preempt_count_sub+0x49/0x50
 [&lt;ffffffff811ab71c&gt;] ? context_tracking_exit+0x5c/0x290
 [&lt;ffffffff811ab71c&gt;] ? context_tracking_exit+0x5c/0x290
 [&lt;ffffffff81248b98&gt;] do_vfs_ioctl+0x318/0x570
 [&lt;ffffffff810dca8d&gt;] ? trace_hardirqs_on+0xd/0x10
 [&lt;ffffffff810dc9b5&gt;] ? trace_hardirqs_on_caller+0x115/0x1e0
 [&lt;ffffffff81254acc&gt;] ? __fget_light+0x6c/0xa0
 [&lt;ffffffff81248e71&gt;] SyS_ioctl+0x81/0xa0
 [&lt;ffffffff81862832&gt;] system_call_fastpath+0x16/0x7a

Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: core: Fix crashes while echoing when closing</title>
<updated>2015-07-24T01:08:28Z</updated>
<author>
<name>Peter Hurley</name>
<email>peter@hurleysoftware.com</email>
</author>
<published>2015-07-13T01:05:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e144c58cad6667876173dd76977e9e6557e34941'/>
<id>urn:sha1:e144c58cad6667876173dd76977e9e6557e34941</id>
<content type='text'>
While closing, new rx data may be received after the input buffers
have been flushed but before stop_rx() halts receiving [1]. The
new data might not be processed by flush_to_ldisc() until after
uart_shutdown() and normal input processing is re-enabled (ie.,
tty-&gt;closing = 0). The race is outlined below:

CPU 0                         | CPU 1
                              |
uart_close()                  |
   tty_port_close_start()     |
      tty-&gt;closing = 1        |
      tty_ldisc_flush()       |
                              | =&gt; IRQ
                              |   while (LSR &amp; data ready)
                              |      uart_insert_char()
                              |   tty_flip_buffer_push()
                              | &lt;= EOI
   stop_rx()                  |   .
   uart_shutdown()            |   .
      free xmit.buf           |   .
   tty_port_tty_set(NULL)     |   .
   tty-&gt;closing = 0           |   .
                              | flush_to_ldisc()
                              |   n_tty_receive_buf_common()
                              |      __receive_buf()
                              |         ...
                              |         commit_echoes()
                              |            uart_flush_chars()
                              |               __uart_start()
                              | ** OOPS on port.tty deref **
   tty_ldisc_flush()          |

Input processing must be prevented from echoing (tty-&gt;closing = 1)
until _after_ the input buffers have been flushed again at the end
of uart_close().

[1] In fact, some input may actually be buffered _after_ stop_rx()
since the rx interrupt may have already triggered but not yet been
handled when stop_rx() disables rx interrupts.

Fixes: 2e758910832d ("serial: core: Flush ldisc after dropping port
mutex in uart_close()")
Reported-by: Robert Elliott &lt;elliott@hp.com&gt;
Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Revert "serial: imx: initialized DMA w/o HW flow enabled"</title>
<updated>2015-07-24T00:40:14Z</updated>
<author>
<name>David Jander</name>
<email>david@protonic.nl</email>
</author>
<published>2015-06-26T06:11:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=907eda32a36fcdb979bdb91ea097abb3dd2c23c9'/>
<id>urn:sha1:907eda32a36fcdb979bdb91ea097abb3dd2c23c9</id>
<content type='text'>
This reverts commit 068500e08dc87ea9a453cc4a500cf3ab28d0f936.

According to some tests, SDMA support is broken at least for i.MX6 without
HW flow control. Different forms of data-corruption appear either with
the ROM firmware for the SDMA controller as well as when loading Freescale
provided SDMA firmware versions 1.1 or 3.1.

Signed-off-by: David Jander &lt;david@protonic.nl&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>sc16is7xx: fix FIFO address of secondary UART</title>
<updated>2015-07-23T22:32:32Z</updated>
<author>
<name>Bo Svangård</name>
<email>bo.svangard@embeddedart.se</email>
</author>
<published>2015-06-13T11:40:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=dec273ecc1169ade46999bb0feca3814915f5c11'/>
<id>urn:sha1:dec273ecc1169ade46999bb0feca3814915f5c11</id>
<content type='text'>
Calls to regmap_raw_read/write needed register rewrite in a
similar way as function calls to regmap_read/write already had.
This enables reading/writing the serial datastream to the device.

Signed-off-by: Bo Svangård &lt;bo.svangard@embeddedart.se&gt;
Signed-off-by: Jakub Kicinski &lt;kubakici@wp.pl&gt;
Signed-off-by: Jon Ringle &lt;jringle@gridpoint.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>sc16is7xx: fix Kconfig dependencies</title>
<updated>2015-07-23T22:32:32Z</updated>
<author>
<name>Jakub Kicinski</name>
<email>kubakici@wp.pl</email>
</author>
<published>2015-07-01T12:19:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=32aa6339d9c5156de5d881b103e0e360934d6a74'/>
<id>urn:sha1:32aa6339d9c5156de5d881b103e0e360934d6a74</id>
<content type='text'>
When I2C=m and SPI=y or-ing them will produce =y while
what we need is the lower bound, i.e. =m.  Fortunately
SPI is a boolean so we need to handle only one special
case.

Reported-by: kbuild test robot &lt;fengguang.wu@intel.com&gt;
Signed-off-by: Jakub Kicinski &lt;kubakici@wp.pl&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: etraxfs-uart: Fix release etraxfs_uart_ports</title>
<updated>2015-07-23T22:25:38Z</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@ingics.com</email>
</author>
<published>2015-06-28T01:45:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d8c2c0d89205a3538c5fd77dc9d4767ee6bebc70'/>
<id>urn:sha1:d8c2c0d89205a3538c5fd77dc9d4767ee6bebc70</id>
<content type='text'>
In probe, we use dev_id as array index of etraxfs_uart_ports and store the
index in port-&gt;line. So etraxfs_uart_ports[port-&gt;line] should be released
when unload the module.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Acked-by: Niklas Cassel &lt;nks@flawful.org&gt;
Acked-by: Jesper Nilsson &lt;jesper.nilsson@axis.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty/vt: Fix the memory leak in visual_init</title>
<updated>2015-07-23T22:11:08Z</updated>
<author>
<name>Dongxing Zhang</name>
<email>dongxing.zhang@intel.com</email>
</author>
<published>2015-06-10T07:21:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=08b33249d89700ba555d4ab5cc88714192b8ee46'/>
<id>urn:sha1:08b33249d89700ba555d4ab5cc88714192b8ee46</id>
<content type='text'>
If vc-&gt;vc_uni_pagedir_loc is not NULL, its refcount needs to be
decreased before vc_uni_pagedir_loc is re-assigned.

unreferenced object 0xffff88002cdd13b0 (size 512):
  comm "setfont", pid 503, jiffies 4294896503 (age 722.828s)
  hex dump (first 32 bytes):
    40 92 61 2b 00 88 ff ff 00 00 00 00 00 00 00 00  @.a+............
    00 00 00 00 00 00 00 00 a0 ad 61 2b 00 88 ff ff  ..........a+....
  backtrace:
    [&lt;ffffffff817b755e&gt;] kmemleak_alloc+0x4e/0xb0
    [&lt;ffffffff811d4898&gt;] kmem_cache_alloc_trace+0x1c8/0x240
    [&lt;ffffffff814ae7d3&gt;] con_do_clear_unimap.isra.2+0x83/0xe0
    [&lt;ffffffff814ae9b2&gt;] con_clear_unimap+0x22/0x40
    [&lt;ffffffff814a8db8&gt;] vt_ioctl+0xeb8/0x1170
    [&lt;ffffffff8149b458&gt;] tty_ioctl+0x208/0xca0
    [&lt;ffffffff81207858&gt;] do_vfs_ioctl+0x2f8/0x510
    [&lt;ffffffff81207af1&gt;] SyS_ioctl+0x81/0xa0
    [&lt;ffffffff817ca2b2&gt;] system_call_fastpath+0x16/0x75
    [&lt;ffffffffffffffff&gt;] 0xffffffffffffffff
unreferenced object 0xffff88002b619240 (size 256):
  comm "setfont", pid 503, jiffies 4294896503 (age 722.828s)
  hex dump (first 32 bytes):
    90 bc 84 d5 00 88 ff ff 58 85 84 d5 00 88 ff ff  ........X.......
    88 ac 84 d5 00 88 ff ff e0 b1 84 d5 00 88 ff ff  ................
  backtrace:
    [&lt;ffffffff817b755e&gt;] kmemleak_alloc+0x4e/0xb0
    [&lt;ffffffff811d4898&gt;] kmem_cache_alloc_trace+0x1c8/0x240
    [&lt;ffffffff814ae286&gt;] con_insert_unipair+0x86/0x170
    [&lt;ffffffff814af107&gt;] con_set_unimap+0x1b7/0x280
    [&lt;ffffffff814a8d65&gt;] vt_ioctl+0xe65/0x1170
    [&lt;ffffffff8149b458&gt;] tty_ioctl+0x208/0xca0
    [&lt;ffffffff81207858&gt;] do_vfs_ioctl+0x2f8/0x510
    [&lt;ffffffff81207af1&gt;] SyS_ioctl+0x81/0xa0
    [&lt;ffffffff817ca2b2&gt;] system_call_fastpath+0x16/0x75
    [&lt;ffffffffffffffff&gt;] 0xffffffffffffffff

Signed-off-by: Dongxing Zhang &lt;dongxing.zhang@intel.com&gt;
Signed-off-by: Xiaoming Wang &lt;xiaoming.wang@intel.com&gt;
Reviewed-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Tested-by: Konstantin Khlebnikov &lt;khlebnikov@yandex-team.ru&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: amba-pl011: Fix devm_ioremap_resource return value check</title>
<updated>2015-07-23T22:05:53Z</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>k.kozlowski.k@gmail.com</email>
</author>
<published>2015-07-09T13:21:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=97a60eac33f663d2150ee1b3c69253d87ba53dff'/>
<id>urn:sha1:97a60eac33f663d2150ee1b3c69253d87ba53dff</id>
<content type='text'>
Value returned by devm_ioremap_resource() was checked for non-NULL but
devm_ioremap_resource() returns IOMEM_ERR_PTR, not NULL. In case of
error this could lead to dereference of ERR_PTR.

Signed-off-by: Krzysztof Kozlowski &lt;k.kozlowski.k@gmail.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Fixes: 3873e2d7f63a ("drivers: PL011: refactor pl011_probe()")
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>n_tty: signal and flush atomically</title>
<updated>2015-07-23T22:05:53Z</updated>
<author>
<name>Peter Hurley</name>
<email>peter@hurleysoftware.com</email>
</author>
<published>2015-06-27T13:21:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3b19e032295647b7be2aa3be62510db4aaeda759'/>
<id>urn:sha1:3b19e032295647b7be2aa3be62510db4aaeda759</id>
<content type='text'>
When handling signalling char, claim the termios write lock before
signalling waiting readers and writers to prevent further i/o
before flushing the echo and output buffers. This prevents a
userspace signal handler which may output from racing the terminal
flush.

Reference: Bugzilla #99351 ("Output truncated in ssh session after...")
Fixes: commit d2b6f44779d3 ("n_tty: Fix signal handling flushes")
Reported-by: Filipe Brandenburger &lt;filbranden@google.com&gt;
Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'armsoc-late' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc</title>
<updated>2015-07-02T21:40:49Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2015-07-02T21:40:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d4113f2f174aea83f0871cf5d050e0e08dfb9781'/>
<id>urn:sha1:d4113f2f174aea83f0871cf5d050e0e08dfb9781</id>
<content type='text'>
Pull ARM SoC late fixes and dependencies from Kevin Hilman:
 "This is a collection of a few late fixes and other misc stuff that had
  dependencies on things being merged from other trees.

  Other than the fixes, the primary feature being added is the
  conversion of some OMAP drivers to the new generic wakeirq interface"

* tag 'armsoc-late' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  ARM: multi_v7_defconfig: Enable BRCMNAND driver
  ARM: BCM: Do not select CONFIG_MTD_NAND_BRCMNAND
  ARM: at91/dt: update udc compatible strings
  ARM: at91/dt: trivial: fix USB udc compatible string
  arm64: dts: Add APM X-Gene standby GPIO controller DTS entries
  soc: qcom: spm: Fix idle on THUMB2 kernels
  ARM: dove: fix legacy dove IRQ numbers
  ARM: mvebu: fix suspend to RAM on big-endian configurations
  ARM: mvebu: adjust Armada XP DT spi muxing after pinctrl function rename
  serial: 8250_omap: Move wake-up interrupt to generic wakeirq
  serial: omap: Switch wake-up interrupt to generic wakeirq
  mmc: omap_hsmmc: Change wake-up interrupt to use generic wakeirq
</content>
</entry>
</feed>
