<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/tty, branch v4.4.24</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>serial: 8250: added acces i/o products quad and octal serial cards</title>
<updated>2016-09-24T08:07:38+00:00</updated>
<author>
<name>Jimi Damon</name>
<email>jdamon@accesio.com</email>
</author>
<published>2016-07-21T00:00:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=58559c6776bee647e48c0673d69af3b398a3d346'/>
<id>58559c6776bee647e48c0673d69af3b398a3d346</id>
<content type='text'>
commit c8d192428f52f244130b84650ad616df09f2b1e1 upstream.

Added devices ids for acces i/o products quad and octal serial cards
that make use of existing Pericom PI7C9X7954 and PI7C9X7958
configurations .

Signed-off-by: Jimi Damon &lt;jdamon@accesio.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit c8d192428f52f244130b84650ad616df09f2b1e1 upstream.

Added devices ids for acces i/o products quad and octal serial cards
that make use of existing Pericom PI7C9X7954 and PI7C9X7958
configurations .

Signed-off-by: Jimi Damon &lt;jdamon@accesio.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>serial: 8250_mid: fix divide error bug if baud rate is 0</title>
<updated>2016-09-24T08:07:38+00:00</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2016-07-01T14:21:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d5d1383049c8d4ed1b906850175be2f547ba574e'/>
<id>d5d1383049c8d4ed1b906850175be2f547ba574e</id>
<content type='text'>
commit 47b34d2ef266e2c283b514d65c8963c2ccd42474 upstream.

Since the commit c1a67b48f6a5 ("serial: 8250_pci: replace switch-case by
formula for Intel MID"), the 8250 driver crashes in the byt_set_termios()
function with a divide error. This is caused by the fact that a baud rate of 0
(B0) is not handled properly. Fix it by falling back to B9600 in this case.

Reported-by: "Mendez Salinas, Fernando" &lt;fernando.mendez.salinas@intel.com&gt;
Fixes: c1a67b48f6a5 ("serial: 8250_pci: replace switch-case by formula for Intel MID")
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 47b34d2ef266e2c283b514d65c8963c2ccd42474 upstream.

Since the commit c1a67b48f6a5 ("serial: 8250_pci: replace switch-case by
formula for Intel MID"), the 8250 driver crashes in the byt_set_termios()
function with a divide error. This is caused by the fact that a baud rate of 0
(B0) is not handled properly. Fix it by falling back to B9600 in this case.

Reported-by: "Mendez Salinas, Fernando" &lt;fernando.mendez.salinas@intel.com&gt;
Fixes: c1a67b48f6a5 ("serial: 8250_pci: replace switch-case by formula for Intel MID")
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>tty/serial: atmel: fix RS485 half duplex with DMA</title>
<updated>2016-08-20T16:09:17+00:00</updated>
<author>
<name>Alexandre Belloni</name>
<email>alexandre.belloni@free-electrons.com</email>
</author>
<published>2016-05-27T22:54:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=580b1bbcc94e37d24e7469b3778338e4e988b190'/>
<id>580b1bbcc94e37d24e7469b3778338e4e988b190</id>
<content type='text'>
commit 0058f0871efe7b01c6f2b3046c68196ab73e96da upstream.

When using DMA, half duplex doesn't work properly because rx is not stopped
before starting tx. Ensure we call atmel_stop_rx() in the DMA case.

Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
Acked-by: Nicolas Ferre &lt;nicolas.ferre@atmel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 0058f0871efe7b01c6f2b3046c68196ab73e96da upstream.

When using DMA, half duplex doesn't work properly because rx is not stopped
before starting tx. Ensure we call atmel_stop_rx() in the DMA case.

Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
Acked-by: Nicolas Ferre &lt;nicolas.ferre@atmel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>serial: samsung: Fix ERR pointer dereference on deferred probe</title>
<updated>2016-08-20T16:09:17+00:00</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>k.kozlowski@samsung.com</email>
</author>
<published>2016-06-16T06:27:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8af97d26ce2054f4914eb382be2ab1d7c994b190'/>
<id>8af97d26ce2054f4914eb382be2ab1d7c994b190</id>
<content type='text'>
commit e51e4d8a185de90424b03f30181b35f29c46a25a upstream.

When the clk_get() of "uart" clock returns EPROBE_DEFER, the next re-probe
finishes with success but uses invalid (ERR_PTR) values.  This leads to
dereferencing of ERR_PTR stored under ourport-&gt;clk:

	12c30000.serial: Controller clock not found
	(...)
	12c30000.serial: ttySAC3 at MMIO 0x12c30000 (irq = 61, base_baud = 0) is a S3C6400/10
	Unable to handle kernel paging request at virtual address fffffdfb

	(clk_prepare) from [&lt;c039f7d0&gt;] (s3c24xx_serial_pm+0x20/0x128)
	(s3c24xx_serial_pm) from [&lt;c0395414&gt;] (uart_change_pm+0x38/0x40)
	(uart_change_pm) from [&lt;c039689c&gt;] (uart_add_one_port+0x31c/0x44c)
	(uart_add_one_port) from [&lt;c03a035c&gt;] (s3c24xx_serial_probe+0x2a8/0x418)
	(s3c24xx_serial_probe) from [&lt;c03ee110&gt;] (platform_drv_probe+0x50/0xb0)
	(platform_drv_probe) from [&lt;c03ecb44&gt;] (driver_probe_device+0x1f4/0x2b0)
	(driver_probe_device) from [&lt;c03eb0c0&gt;] (bus_for_each_drv+0x44/0x8c)
	(bus_for_each_drv) from [&lt;c03ec8c8&gt;] (__device_attach+0x9c/0x100)
	(__device_attach) from [&lt;c03ebf54&gt;] (bus_probe_device+0x84/0x8c)
	(bus_probe_device) from [&lt;c03ec388&gt;] (deferred_probe_work_func+0x60/0x8c)
	(deferred_probe_work_func) from [&lt;c012fee4&gt;] (process_one_work+0x120/0x328)
	(process_one_work) from [&lt;c0130150&gt;] (worker_thread+0x2c/0x4ac)
	(worker_thread) from [&lt;c0135320&gt;] (kthread+0xd8/0xf4)
	(kthread) from [&lt;c0107978&gt;] (ret_from_fork+0x14/0x3c)

The first unsuccessful clk_get() causes s3c24xx_serial_init_port() to
exit with failure but the s3c24xx_uart_port is left half-configured
(e.g. port-&gt;mapbase is set, clk contains ERR_PTR).  On next re-probe,
the function s3c24xx_serial_init_port() will exit early with success
because of configured port-&gt;mapbase and driver will use old values,
including the ERR_PTR as clock.

Fix this by cleaning the port-&gt;mapbase on error path so each re-probe
will initialize all of the port settings.

Fixes: 60e93575476f ("serial: samsung: enable clock before clearing pending interrupts during init")
Signed-off-by: Krzysztof Kozlowski &lt;k.kozlowski@samsung.com&gt;
Reviewed-by: Javier Martinez Canillas &lt;javier@osg.samsung.com&gt;
Tested-by: Javier Martinez Canillas &lt;javier@osg.samsung.com&gt;
Tested-by: Kevin Hilman &lt;khilman@baylibre.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit e51e4d8a185de90424b03f30181b35f29c46a25a upstream.

When the clk_get() of "uart" clock returns EPROBE_DEFER, the next re-probe
finishes with success but uses invalid (ERR_PTR) values.  This leads to
dereferencing of ERR_PTR stored under ourport-&gt;clk:

	12c30000.serial: Controller clock not found
	(...)
	12c30000.serial: ttySAC3 at MMIO 0x12c30000 (irq = 61, base_baud = 0) is a S3C6400/10
	Unable to handle kernel paging request at virtual address fffffdfb

	(clk_prepare) from [&lt;c039f7d0&gt;] (s3c24xx_serial_pm+0x20/0x128)
	(s3c24xx_serial_pm) from [&lt;c0395414&gt;] (uart_change_pm+0x38/0x40)
	(uart_change_pm) from [&lt;c039689c&gt;] (uart_add_one_port+0x31c/0x44c)
	(uart_add_one_port) from [&lt;c03a035c&gt;] (s3c24xx_serial_probe+0x2a8/0x418)
	(s3c24xx_serial_probe) from [&lt;c03ee110&gt;] (platform_drv_probe+0x50/0xb0)
	(platform_drv_probe) from [&lt;c03ecb44&gt;] (driver_probe_device+0x1f4/0x2b0)
	(driver_probe_device) from [&lt;c03eb0c0&gt;] (bus_for_each_drv+0x44/0x8c)
	(bus_for_each_drv) from [&lt;c03ec8c8&gt;] (__device_attach+0x9c/0x100)
	(__device_attach) from [&lt;c03ebf54&gt;] (bus_probe_device+0x84/0x8c)
	(bus_probe_device) from [&lt;c03ec388&gt;] (deferred_probe_work_func+0x60/0x8c)
	(deferred_probe_work_func) from [&lt;c012fee4&gt;] (process_one_work+0x120/0x328)
	(process_one_work) from [&lt;c0130150&gt;] (worker_thread+0x2c/0x4ac)
	(worker_thread) from [&lt;c0135320&gt;] (kthread+0xd8/0xf4)
	(kthread) from [&lt;c0107978&gt;] (ret_from_fork+0x14/0x3c)

The first unsuccessful clk_get() causes s3c24xx_serial_init_port() to
exit with failure but the s3c24xx_uart_port is left half-configured
(e.g. port-&gt;mapbase is set, clk contains ERR_PTR).  On next re-probe,
the function s3c24xx_serial_init_port() will exit early with success
because of configured port-&gt;mapbase and driver will use old values,
including the ERR_PTR as clock.

Fix this by cleaning the port-&gt;mapbase on error path so each re-probe
will initialize all of the port settings.

Fixes: 60e93575476f ("serial: samsung: enable clock before clearing pending interrupts during init")
Signed-off-by: Krzysztof Kozlowski &lt;k.kozlowski@samsung.com&gt;
Reviewed-by: Javier Martinez Canillas &lt;javier@osg.samsung.com&gt;
Tested-by: Javier Martinez Canillas &lt;javier@osg.samsung.com&gt;
Tested-by: Kevin Hilman &lt;khilman@baylibre.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>tty: serial: msm: Don't read off end of tx fifo</title>
<updated>2016-08-20T16:09:16+00:00</updated>
<author>
<name>Bjorn Andersson</name>
<email>bjorn.andersson@linaro.org</email>
</author>
<published>2016-06-03T00:48:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=79b8ddbebf7420fa71c76d4f5f892b21ef1e4456'/>
<id>79b8ddbebf7420fa71c76d4f5f892b21ef1e4456</id>
<content type='text'>
commit 30acf549ca1e81859a67590ab9ecfce3d1050a0b upstream.

For dm uarts in pio mode tx data is transferred to the fifo register 4
bytes at a time, but care is not taken when these 4 bytes spans the end
of the xmit buffer so the loop might read up to 3 bytes past the buffer
and then skip the actual data at the beginning of the buffer.

Fix this by, analogous to the DMA case, make sure the chunk doesn't
wrap the xmit buffer.

Fixes: 3a878c430fd6 ("tty: serial: msm: Add TX DMA support")
Cc: Ivan Ivanov &lt;iivanov.xz@gmail.com&gt;
Reported-by: Frank Rowand &lt;frowand.list@gmail.com&gt;
Reported-by: Nicolas Dechesne &lt;nicolas.dechesne@linaro.org&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Acked-by: Andy Gross &lt;andy.gross@linaro.org&gt;
Tested-by: Frank Rowand &lt;frank.rowand@am.sony.com&gt;
Reviewed-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 30acf549ca1e81859a67590ab9ecfce3d1050a0b upstream.

For dm uarts in pio mode tx data is transferred to the fifo register 4
bytes at a time, but care is not taken when these 4 bytes spans the end
of the xmit buffer so the loop might read up to 3 bytes past the buffer
and then skip the actual data at the beginning of the buffer.

Fix this by, analogous to the DMA case, make sure the chunk doesn't
wrap the xmit buffer.

Fixes: 3a878c430fd6 ("tty: serial: msm: Add TX DMA support")
Cc: Ivan Ivanov &lt;iivanov.xz@gmail.com&gt;
Reported-by: Frank Rowand &lt;frowand.list@gmail.com&gt;
Reported-by: Nicolas Dechesne &lt;nicolas.dechesne@linaro.org&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Acked-by: Andy Gross &lt;andy.gross@linaro.org&gt;
Tested-by: Frank Rowand &lt;frank.rowand@am.sony.com&gt;
Reviewed-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>devpts: clean up interface to pty drivers</title>
<updated>2016-08-16T07:30:49+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-04-16T22:16:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5c7d0f49cf1492866fa619af4538f56938abe07d'/>
<id>5c7d0f49cf1492866fa619af4538f56938abe07d</id>
<content type='text'>
commit 67245ff332064c01b760afa7a384ccda024bfd24 upstream.

This gets rid of the horrible notion of having that

    struct inode *ptmx_inode

be the linchpin of the interface between the pty code and devpts.

By de-emphasizing the ptmx inode, a lot of things actually get cleaner,
and we will have a much saner way forward.  In particular, this will
allow us to associate with any particular devpts instance at open-time,
and not be artificially tied to one particular ptmx inode.

The patch itself is actually fairly straightforward, and apart from some
locking and return path cleanups it's pretty mechanical:

 - the interfaces that devpts exposes all take "struct pts_fs_info *"
   instead of "struct inode *ptmx_inode" now.

   NOTE! The "struct pts_fs_info" thing is a completely opaque structure
   as far as the pty driver is concerned: it's still declared entirely
   internally to devpts. So the pty code can't actually access it in any
   way, just pass it as a "cookie" to the devpts code.

 - the "look up the pts fs info" is now a single clear operation, that
   also does the reference count increment on the pts superblock.

   So "devpts_add/del_ref()" is gone, and replaced by a "lookup and get
   ref" operation (devpts_get_ref(inode)), along with a "put ref" op
   (devpts_put_ref()).

 - the pty master "tty-&gt;driver_data" field now contains the pts_fs_info,
   not the ptmx inode.

 - because we don't care about the ptmx inode any more as some kind of
   base index, the ref counting can now drop the inode games - it just
   gets the ref on the superblock.

 - the pts_fs_info now has a back-pointer to the super_block. That's so
   that we can easily look up the information we actually need. Although
   quite often, the pts fs info was actually all we wanted, and not having
   to look it up based on some magical inode makes things more
   straightforward.

In particular, now that "devpts_get_ref(inode)" operation should really
be the *only* place we need to look up what devpts instance we're
associated with, and we do it exactly once, at ptmx_open() time.

The other side of this is that one ptmx node could now be associated
with multiple different devpts instances - you could have a single
/dev/ptmx node, and then have multiple mount namespaces with their own
instances of devpts mounted on /dev/pts/.  And that's all perfectly sane
in a model where we just look up the pts instance at open time.

This will eventually allow us to get rid of our odd single-vs-multiple
pts instance model, but this patch in itself changes no semantics, only
an internal binding model.

Cc: Eric Biederman &lt;ebiederm@xmission.com&gt;
Cc: Peter Anvin &lt;hpa@zytor.com&gt;
Cc: Andy Lutomirski &lt;luto@amacapital.net&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Cc: Serge Hallyn &lt;serge.hallyn@ubuntu.com&gt;
Cc: Willy Tarreau &lt;w@1wt.eu&gt;
Cc: Aurelien Jarno &lt;aurelien@aurel32.net&gt;
Cc: Alan Cox &lt;gnomes@lxorguk.ukuu.org.uk&gt;
Cc: Jann Horn &lt;jann@thejh.net&gt;
Cc: Greg KH &lt;greg@kroah.com&gt;
Cc: Jiri Slaby &lt;jslaby@suse.com&gt;
Cc: Florian Weimer &lt;fw@deneb.enyo.de&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Francesco Ruggeri &lt;fruggeri@arista.com&gt;
Cc: "Herton R. Krzesinski" &lt;herton@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 67245ff332064c01b760afa7a384ccda024bfd24 upstream.

This gets rid of the horrible notion of having that

    struct inode *ptmx_inode

be the linchpin of the interface between the pty code and devpts.

By de-emphasizing the ptmx inode, a lot of things actually get cleaner,
and we will have a much saner way forward.  In particular, this will
allow us to associate with any particular devpts instance at open-time,
and not be artificially tied to one particular ptmx inode.

The patch itself is actually fairly straightforward, and apart from some
locking and return path cleanups it's pretty mechanical:

 - the interfaces that devpts exposes all take "struct pts_fs_info *"
   instead of "struct inode *ptmx_inode" now.

   NOTE! The "struct pts_fs_info" thing is a completely opaque structure
   as far as the pty driver is concerned: it's still declared entirely
   internally to devpts. So the pty code can't actually access it in any
   way, just pass it as a "cookie" to the devpts code.

 - the "look up the pts fs info" is now a single clear operation, that
   also does the reference count increment on the pts superblock.

   So "devpts_add/del_ref()" is gone, and replaced by a "lookup and get
   ref" operation (devpts_get_ref(inode)), along with a "put ref" op
   (devpts_put_ref()).

 - the pty master "tty-&gt;driver_data" field now contains the pts_fs_info,
   not the ptmx inode.

 - because we don't care about the ptmx inode any more as some kind of
   base index, the ref counting can now drop the inode games - it just
   gets the ref on the superblock.

 - the pts_fs_info now has a back-pointer to the super_block. That's so
   that we can easily look up the information we actually need. Although
   quite often, the pts fs info was actually all we wanted, and not having
   to look it up based on some magical inode makes things more
   straightforward.

In particular, now that "devpts_get_ref(inode)" operation should really
be the *only* place we need to look up what devpts instance we're
associated with, and we do it exactly once, at ptmx_open() time.

The other side of this is that one ptmx node could now be associated
with multiple different devpts instances - you could have a single
/dev/ptmx node, and then have multiple mount namespaces with their own
instances of devpts mounted on /dev/pts/.  And that's all perfectly sane
in a model where we just look up the pts instance at open time.

This will eventually allow us to get rid of our odd single-vs-multiple
pts instance model, but this patch in itself changes no semantics, only
an internal binding model.

Cc: Eric Biederman &lt;ebiederm@xmission.com&gt;
Cc: Peter Anvin &lt;hpa@zytor.com&gt;
Cc: Andy Lutomirski &lt;luto@amacapital.net&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Cc: Serge Hallyn &lt;serge.hallyn@ubuntu.com&gt;
Cc: Willy Tarreau &lt;w@1wt.eu&gt;
Cc: Aurelien Jarno &lt;aurelien@aurel32.net&gt;
Cc: Alan Cox &lt;gnomes@lxorguk.ukuu.org.uk&gt;
Cc: Jann Horn &lt;jann@thejh.net&gt;
Cc: Greg KH &lt;greg@kroah.com&gt;
Cc: Jiri Slaby &lt;jslaby@suse.com&gt;
Cc: Florian Weimer &lt;fw@deneb.enyo.de&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Francesco Ruggeri &lt;fruggeri@arista.com&gt;
Cc: "Herton R. Krzesinski" &lt;herton@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>tty/vt/keyboard: fix OOB access in do_compute_shiftstate()</title>
<updated>2016-07-27T16:47:37+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2016-06-27T21:12:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7d091e02c94ad10414056a6dc9f37441e4a261fe'/>
<id>7d091e02c94ad10414056a6dc9f37441e4a261fe</id>
<content type='text'>
commit 510cccb5b0c8868a2b302a0ab524da7912da648b upstream.

The size of individual keymap in drivers/tty/vt/keyboard.c is NR_KEYS,
which is currently 256, whereas number of keys/buttons in input device (and
therefor in key_down) is much larger - KEY_CNT - 768, and that can cause
out-of-bound access when we do

	sym = U(key_maps[0][k]);

with large 'k'.

To fix it we should not attempt iterating beyond smaller of NR_KEYS and
KEY_CNT.

Also while at it let's switch to for_each_set_bit() instead of open-coding
it.

Reported-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
Reviewed-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 510cccb5b0c8868a2b302a0ab524da7912da648b upstream.

The size of individual keymap in drivers/tty/vt/keyboard.c is NR_KEYS,
which is currently 256, whereas number of keys/buttons in input device (and
therefor in key_down) is much larger - KEY_CNT - 768, and that can cause
out-of-bound access when we do

	sym = U(key_maps[0][k]);

with large 'k'.

To fix it we should not attempt iterating beyond smaller of NR_KEYS and
KEY_CNT.

Also while at it let's switch to for_each_set_bit() instead of open-coding
it.

Reported-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
Reviewed-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>tty: vt: Fix soft lockup in fbcon cursor blink timer.</title>
<updated>2016-07-27T16:47:37+00:00</updated>
<author>
<name>David Daney</name>
<email>david.daney@cavium.com</email>
</author>
<published>2016-05-17T18:41:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=97c96c43d9ef67f57fde7943a5d8d34daec0432f'/>
<id>97c96c43d9ef67f57fde7943a5d8d34daec0432f</id>
<content type='text'>
commit 1b45996d2ebf9680ccd0db875fc668aa025f40fd upstream.

We are getting somewhat random soft lockups with this signature:

[   86.992215] [&lt;fffffc00080935e0&gt;] el1_irq+0xa0/0x10c
[   86.997082] [&lt;fffffc000841822c&gt;] cursor_timer_handler+0x30/0x54
[   87.002991] [&lt;fffffc000810ec44&gt;] call_timer_fn+0x54/0x1a8
[   87.008378] [&lt;fffffc000810ef88&gt;] run_timer_softirq+0x1c4/0x2bc
[   87.014200] [&lt;fffffc000809077c&gt;] __do_softirq+0x114/0x344
[   87.019590] [&lt;fffffc00080af45c&gt;] irq_exit+0x74/0x98
[   87.024458] [&lt;fffffc00080fac20&gt;] __handle_domain_irq+0x98/0xfc
[   87.030278] [&lt;fffffc000809056c&gt;] gic_handle_irq+0x94/0x190

This is caused by the vt visual_init() function calling into
fbcon_init() with a vc_cur_blink_ms value of zero.  This is a
transient condition, as it is later set to a non-zero value.  But, if
the timer happens to expire while the blink rate is zero, it goes into
an endless loop, and we get soft lockup.

The fix is to initialize vc_cur_blink_ms before calling the con_init()
function.

Signed-off-by: David Daney &lt;david.daney@cavium.com&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Tested-by: Ming Lei &lt;ming.lei@canonical.com&gt;
Acked-by: Scot Doyle &lt;lkml14@scotdoyle.com&gt;
Tested-by: Henrique de Moraes Holschuh &lt;hmh@hmh.eng.br&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 1b45996d2ebf9680ccd0db875fc668aa025f40fd upstream.

We are getting somewhat random soft lockups with this signature:

[   86.992215] [&lt;fffffc00080935e0&gt;] el1_irq+0xa0/0x10c
[   86.997082] [&lt;fffffc000841822c&gt;] cursor_timer_handler+0x30/0x54
[   87.002991] [&lt;fffffc000810ec44&gt;] call_timer_fn+0x54/0x1a8
[   87.008378] [&lt;fffffc000810ef88&gt;] run_timer_softirq+0x1c4/0x2bc
[   87.014200] [&lt;fffffc000809077c&gt;] __do_softirq+0x114/0x344
[   87.019590] [&lt;fffffc00080af45c&gt;] irq_exit+0x74/0x98
[   87.024458] [&lt;fffffc00080fac20&gt;] __handle_domain_irq+0x98/0xfc
[   87.030278] [&lt;fffffc000809056c&gt;] gic_handle_irq+0x94/0x190

This is caused by the vt visual_init() function calling into
fbcon_init() with a vc_cur_blink_ms value of zero.  This is a
transient condition, as it is later set to a non-zero value.  But, if
the timer happens to expire while the blink rate is zero, it goes into
an endless loop, and we get soft lockup.

The fix is to initialize vc_cur_blink_ms before calling the con_init()
function.

Signed-off-by: David Daney &lt;david.daney@cavium.com&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Tested-by: Ming Lei &lt;ming.lei@canonical.com&gt;
Acked-by: Scot Doyle &lt;lkml14@scotdoyle.com&gt;
Tested-by: Henrique de Moraes Holschuh &lt;hmh@hmh.eng.br&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>QE-UART: add "fsl,t1040-ucc-uart" to of_device_id</title>
<updated>2016-06-08T01:14:35+00:00</updated>
<author>
<name>Zhao Qiang</name>
<email>qiang.zhao@nxp.com</email>
</author>
<published>2016-03-09T01:48:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5015641d2152f0fdb328d45d517db95be5485edc'/>
<id>5015641d2152f0fdb328d45d517db95be5485edc</id>
<content type='text'>
commit 11ca2b7ab432eb90906168c327733575e68d388f upstream.

New bindings use "fsl,t1040-ucc-uart" as the compatible for qe-uart.
So add it.

Signed-off-by: Zhao Qiang &lt;qiang.zhao@nxp.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 11ca2b7ab432eb90906168c327733575e68d388f upstream.

New bindings use "fsl,t1040-ucc-uart" as the compatible for qe-uart.
So add it.

Signed-off-by: Zhao Qiang &lt;qiang.zhao@nxp.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>serial: samsung: Reorder the sequence of clock control when call s3c24xx_serial_set_termios()</title>
<updated>2016-06-01T19:15:53+00:00</updated>
<author>
<name>Chanwoo Choi</name>
<email>cw00.choi@samsung.com</email>
</author>
<published>2016-04-21T09:58:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=df8ad62006f452ee4902e216e955f1a142cf144f'/>
<id>df8ad62006f452ee4902e216e955f1a142cf144f</id>
<content type='text'>
commit b8995f527aac143e83d3900ff39357651ea4e0f6 upstream.

This patch fixes the broken serial log when changing the clock source
of uart device. Before disabling the original clock source, this patch
enables the new clock source to protect the clock off state for a split second.

Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Reviewed-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Krzysztof Kozlowski &lt;k.kozlowski@samsung.com&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit b8995f527aac143e83d3900ff39357651ea4e0f6 upstream.

This patch fixes the broken serial log when changing the clock source
of uart device. Before disabling the original clock source, this patch
enables the new clock source to protect the clock off state for a split second.

Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Reviewed-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Krzysztof Kozlowski &lt;k.kozlowski@samsung.com&gt;

</pre>
</div>
</content>
</entry>
</feed>
