<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/tty, branch v5.0</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=v5.0</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.0'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2019-02-08T18:49:55Z</updated>
<entry>
<title>Merge tag 'tty-5.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty</title>
<updated>2019-02-08T18:49:55Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2019-02-08T18:49:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e22a15d1c4b36877934ab360aace41ddf8a6577c'/>
<id>urn:sha1:e22a15d1c4b36877934ab360aace41ddf8a6577c</id>
<content type='text'>
Pull tty/serial fixes from Greg KH:
 "Here are some small tty and serial fixes for 5.0-rc6.

  Nothing huge, just a few small fixes for reported issues. The speakup
  fix is in here as it is a tty operation issue.

  All of these have been in linux-next for a while with no reported
  problems"

* tag 'tty-5.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  serial: fix race between flush_to_ldisc and tty_open
  staging: speakup: fix tty-operation NULL derefs
  serial: sh-sci: Do not free irqs that have already been freed
  serial: 8250_pci: Make PCI class test non fatal
  tty: serial: 8250_mtk: Fix potential NULL pointer dereference
</content>
</entry>
<entry>
<title>Merge tag 'riscv-for-linus-5.0-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux</title>
<updated>2019-02-02T18:26:14Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2019-02-02T18:26:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=74b13e7efe005a600451d024d0c8fd52d58ad959'/>
<id>urn:sha1:74b13e7efe005a600451d024d0c8fd52d58ad959</id>
<content type='text'>
Pull RISC-V fixes from Palmer Dabbelt:
 "This contains a handful of mostly-independent patches:

   - make our port respect TIF_NEED_RESCHED, which fixes
     CONFIG_PREEMPT=y kernels

   - fix double-put of OF nodes

   - fix a misspelling of target in our Kconfig

   - generic PCIe is enabled in our defconfig

   - fix our SBI early console to properly handle line
     endings

   - fix max_low_pfn being counted in PFNs

   - a change to TASK_UNMAPPED_BASE to match what other
     arches do

  This has passed my standard 'boot Fedora' flow"

* tag 'riscv-for-linus-5.0-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux:
  riscv: Adjust mmap base address at a third of task size
  riscv: fixup max_low_pfn with PFN_DOWN.
  tty/serial: use uart_console_write in the RISC-V SBL early console
  RISC-V: defconfig: Add CRYPTO_DEV_VIRTIO=y
  RISC-V: defconfig: Enable Generic PCIE by default
  RISC-V: defconfig: Move CONFIG_PCI{,E_XILINX}
  RISC-V: Kconfig: fix spelling mistake "traget" -&gt; "target"
  RISC-V: asm/page.h: fix spelling mistake "CONFIG_64BITS" -&gt; "CONFIG_64BIT"
  RISC-V: fix bad use of of_node_put
  RISC-V: Add _TIF_NEED_RESCHED check for kernel thread when CONFIG_PREEMPT=y
</content>
</entry>
<entry>
<title>serial: fix race between flush_to_ldisc and tty_open</title>
<updated>2019-01-31T18:43:04Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2019-01-31T09:43:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fedb5760648a291e949f2380d383b5b2d2749b5e'/>
<id>urn:sha1:fedb5760648a291e949f2380d383b5b2d2749b5e</id>
<content type='text'>
There still is a race window after the commit b027e2298bd588
("tty: fix data race between tty_init_dev and flush of buf"),
and we encountered this crash issue if receive_buf call comes
before tty initialization completes in tty_open and
tty-&gt;driver_data may be NULL.

CPU0                                    CPU1
----                                    ----
                                  tty_open
                                   tty_init_dev
                                     tty_ldisc_unlock
                                       schedule
flush_to_ldisc
 receive_buf
  tty_port_default_receive_buf
   tty_ldisc_receive_buf
    n_tty_receive_buf_common
      __receive_buf
       uart_flush_chars
        uart_start
        /*tty-&gt;driver_data is NULL*/
                                   tty-&gt;ops-&gt;open
                                   /*init tty-&gt;driver_data*/

it can be fixed by extending ldisc semaphore lock in tty_init_dev
to driver_data initialized completely after tty-&gt;ops-&gt;open(), but
this will lead to get lock on one function and unlock in some other
function, and hard to maintain, so fix this race only by checking
tty-&gt;driver_data when receiving, and return if tty-&gt;driver_data
is NULL, and n_tty_receive_buf_common maybe calls uart_unthrottle,
so add the same check.

Because the tty layer knows nothing about the driver associated with the
device, the tty layer can not do anything here, it is up to the tty
driver itself to check for this type of race.  Fix up the serial driver
to correctly check to see if it is finished binding with the device when
being called, and if not, abort the tty calls.

[Description and problem report and testing from Li RongQing, I rewrote
the patch to be in the serial layer, not in the tty core - gregkh]

Reported-by: Li RongQing &lt;lirongqing@baidu.com&gt;
Tested-by: Li RongQing &lt;lirongqing@baidu.com&gt;
Signed-off-by: Wang Li &lt;wangli39@baidu.com&gt;
Signed-off-by: Zhang Yu &lt;zhangyu31@baidu.com&gt;
Signed-off-by: Li RongQing &lt;lirongqing@baidu.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: sh-sci: Do not free irqs that have already been freed</title>
<updated>2019-01-30T08:35:46Z</updated>
<author>
<name>Chris Brandt</name>
<email>chris.brandt@renesas.com</email>
</author>
<published>2019-01-28T18:25:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4d95987a32db53f3beca76f8c4c8309ef6a5f192'/>
<id>urn:sha1:4d95987a32db53f3beca76f8c4c8309ef6a5f192</id>
<content type='text'>
Since IRQs might be muxed on some parts, we need to pay attention when we
are freeing them.
Otherwise we get the ugly WARNING "Trying to free already-free IRQ 20".

Fixes: 628c534ae735 ("serial: sh-sci: Improve support for separate TEI and DRI interrupts")
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Chris Brandt &lt;chris.brandt@renesas.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: 8250_pci: Make PCI class test non fatal</title>
<updated>2019-01-30T08:35:46Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2019-01-24T21:51:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=824d17c57b0abbcb9128fb3f7327fae14761914b'/>
<id>urn:sha1:824d17c57b0abbcb9128fb3f7327fae14761914b</id>
<content type='text'>
As has been reported the National Instruments serial cards have broken
PCI class.

The commit 7d8905d06405

  ("serial: 8250_pci: Enable device after we check black list")

made the PCI class check mandatory for the case when device is listed in
a quirk list.

Make PCI class test non fatal to allow broken card be enumerated.

Fixes: 7d8905d06405 ("serial: 8250_pci: Enable device after we check black list")
Cc: stable &lt;stable@vger.kernel.org&gt;
Reported-by: Guan Yung Tseng &lt;guan.yung.tseng@ni.com&gt;
Tested-by: Guan Yung Tseng &lt;guan.yung.tseng@ni.com&gt;
Tested-by: KHUENY.Gerhard &lt;Gerhard.KHUENY@bachmann.info&gt;
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: serial: 8250_mtk: Fix potential NULL pointer dereference</title>
<updated>2019-01-30T08:35:46Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavo@embeddedor.com</email>
</author>
<published>2019-01-22T19:57:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1575c083a78cc1137ad8bfa042d02eeb9dc86ef4'/>
<id>urn:sha1:1575c083a78cc1137ad8bfa042d02eeb9dc86ef4</id>
<content type='text'>
There is a potential NULL pointer dereference in case devm_kzalloc()
fails and returns NULL.

Fix this by adding a NULL check on data-&gt;dma

This bug was detected with the help of Coccinelle.

Fixes: 85b5c1dd0456 ("serial: 8250-mtk: add uart DMA support")
Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty/serial: use uart_console_write in the RISC-V SBL early console</title>
<updated>2019-01-23T23:41:50Z</updated>
<author>
<name>Andreas Schwab</name>
<email>schwab@suse.de</email>
</author>
<published>2019-01-10T17:11:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a19f74708ef693d7ddc3ee577a458b6807d43e5b'/>
<id>urn:sha1:a19f74708ef693d7ddc3ee577a458b6807d43e5b</id>
<content type='text'>
This enables proper NLCR processing.

Suggested-by: Anup Patel &lt;anup@brainfault.org&gt;
Signed-off-by: Andreas Schwab &lt;schwab@suse.de&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Palmer Dabbelt &lt;palmer@sifive.com&gt;
</content>
</entry>
<entry>
<title>serial: fsl_lpuart: fix maximum acceptable baud rate with over-sampling</title>
<updated>2019-01-22T08:32:08Z</updated>
<author>
<name>Tomonori Sakita</name>
<email>tomonori.sakita@sord.co.jp</email>
</author>
<published>2019-01-21T08:34:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=815d835b7ba46685c316b000013367dacb2b461b'/>
<id>urn:sha1:815d835b7ba46685c316b000013367dacb2b461b</id>
<content type='text'>
Using over-sampling ratio, lpuart can accept baud rate upto uartclk / 4.

Signed-off-by: Tomonori Sakita &lt;tomonori.sakita@sord.co.jp&gt;
Signed-off-by: Atsushi Nemoto &lt;atsushi.nemoto@sord.co.jp&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: serial: qcom_geni_serial: Allow mctrl when flow control is disabled</title>
<updated>2019-01-22T08:32:07Z</updated>
<author>
<name>Matthias Kaehlcke</name>
<email>mka@chromium.org</email>
</author>
<published>2019-01-19T00:23:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e8a6ca808c5ed1e2b43ab25f1f2cbd43a7574f73'/>
<id>urn:sha1:e8a6ca808c5ed1e2b43ab25f1f2cbd43a7574f73</id>
<content type='text'>
The geni set/get_mctrl() functions currently do nothing unless
hardware flow control is enabled. Remove this arbitrary limitation.

Suggested-by: Johan Hovold &lt;johan@kernel.org&gt;
Fixes: 8a8a66a1a18a ("tty: serial: qcom_geni_serial: Add support for flow control")
Signed-off-by: Matthias Kaehlcke &lt;mka@chromium.org&gt;
Reviewed-by: Johan Hovold &lt;johan@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: Handle problem if line discipline does not have receive_buf</title>
<updated>2019-01-21T16:41:02Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2019-01-20T09:46:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=27cfb3a53be46a54ec5e0bd04e51995b74c90343'/>
<id>urn:sha1:27cfb3a53be46a54ec5e0bd04e51995b74c90343</id>
<content type='text'>
Some tty line disciplines do not have a receive buf callback, so
properly check for that before calling it.  If they do not have this
callback, just eat the character quietly, as we can't fail this call.

Reported-by: Jann Horn &lt;jannh@google.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
