<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/tty/serial/uartlite.c, branch v5.4</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.4</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.4'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2019-10-04T13:02:46Z</updated>
<entry>
<title>serial: uartlite: fix exit path null pointer</title>
<updated>2019-10-04T13:02:46Z</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@infradead.org</email>
</author>
<published>2019-09-16T23:12:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a553add0846f355a28ed4e81134012e4a1e280c2'/>
<id>urn:sha1:a553add0846f355a28ed4e81134012e4a1e280c2</id>
<content type='text'>
Call uart_unregister_driver() conditionally instead of
unconditionally, only if it has been previously registered.

This uses driver.state, just as the sh-sci.c driver does.

Fixes this null pointer dereference in tty_unregister_driver(),
since the 'driver' argument is null:

  general protection fault: 0000 [#1] PREEMPT SMP KASAN PTI
  RIP: 0010:tty_unregister_driver+0x25/0x1d0

Fixes: 238b8721a554 ("[PATCH] serial uartlite driver")
Signed-off-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Cc: Peter Korsgaard &lt;jacmet@sunsite.dk&gt;
Link: https://lore.kernel.org/r/9c8e6581-6fcc-a595-0897-4d90f5d710df@infradead.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial-uartlite: fix null pointer dereference on pointer port</title>
<updated>2018-11-27T08:08:15Z</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2018-11-13T09:43:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ee0a29ba574bde9861eee08d7b13a9cfbfcc8d1f'/>
<id>urn:sha1:ee0a29ba574bde9861eee08d7b13a9cfbfcc8d1f</id>
<content type='text'>
Pointer port is dereferenced on port-&gt;private_data when assigning pointer
pdata before port is null checked, leading to a potential null pointer
dereference.  Fix this by assigning pdata after the null pointer check on
port.

Detected by CoverityScan, CID#1475434 ("Dereference before null check")

Fixes: 3b209d253e7f ("serial-uartlite: Do not use static struct uart_driver out of probe()")
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial-uartlite: Fix the unbind path</title>
<updated>2018-11-09T16:45:07Z</updated>
<author>
<name>Shubhrajyoti Datta</name>
<email>shubhrajyoti.datta@xilinx.com</email>
</author>
<published>2018-10-16T10:18:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b312f6f4ac84bcd9587fd24316b5de7c3f319b88'/>
<id>urn:sha1:b312f6f4ac84bcd9587fd24316b5de7c3f319b88</id>
<content type='text'>
Currently the clocks are not enabled at probe but when the port is used.
Remove the unconditional disable at remove.

Fixes the below
[   77.660196] ------------[ cut here ]------------
[   77.664749] WARNING: CPU: 0 PID: 1992 at drivers/clk/clk.c:622
clk_core_disable+0x78/0x80
[   77.672892] Modules linked in:
[   77.675930] CPU: 0 PID: 1992 Comm: sh Not tainted 4.14.0 #23
[   77.681570] Hardware name: xlnx,zynqmp (DT)
[   77.685736] task: ffffffc879e2e580 task.stack: ffffff800be30000
[   77.691641] PC is at clk_core_disable+0x78/0x80

Signed-off-by: Shubhrajyoti Datta &lt;shubhrajyoti.datta@xilinx.com&gt;
Signed-off-by: Michal Simek &lt;michal.simek@xilinx.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial-uartlite: Add runtime support</title>
<updated>2018-11-09T16:45:07Z</updated>
<author>
<name>Shubhrajyoti Datta</name>
<email>shubhrajyoti.datta@xilinx.com</email>
</author>
<published>2018-10-16T10:18:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0379b1163e509cfc4c18643b27231c04c78981ab'/>
<id>urn:sha1:0379b1163e509cfc4c18643b27231c04c78981ab</id>
<content type='text'>
Add runtime support

Signed-off-by: Shubhrajyoti Datta &lt;shubhrajyoti.datta@xilinx.com&gt;
Signed-off-by: Michal Simek &lt;michal.simek@xilinx.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial-uartlite: Do not use static struct uart_driver out of probe()</title>
<updated>2018-11-09T16:45:07Z</updated>
<author>
<name>Shubhrajyoti Datta</name>
<email>shubhrajyoti.datta@xilinx.com</email>
</author>
<published>2018-10-16T10:18:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3b209d253e7f8aa01fde0233d38a7239c8f7beb3'/>
<id>urn:sha1:3b209d253e7f8aa01fde0233d38a7239c8f7beb3</id>
<content type='text'>
ulite_uart_suspend()/resume() and remove() are using static reference
to struct uart_driver. Assign this referece to private data structure
as preparation step for dynamic struct uart_driver allocation.

Signed-off-by: Shubhrajyoti Datta &lt;shubhrajyoti.datta@xilinx.com&gt;
Signed-off-by: Michal Simek &lt;michal.simek@xilinx.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial-uartlite: Add get serial id if not provided</title>
<updated>2018-11-09T16:45:07Z</updated>
<author>
<name>Shubhrajyoti Datta</name>
<email>shubhrajyoti.datta@xilinx.com</email>
</author>
<published>2018-10-16T10:18:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=62104b280a5a5d999c562d8e8f4c6c4eb97fb013'/>
<id>urn:sha1:62104b280a5a5d999c562d8e8f4c6c4eb97fb013</id>
<content type='text'>
Add get serial id if not provided

Signed-off-by: Shubhrajyoti Datta &lt;shubhrajyoti.datta@xilinx.com&gt;
Signed-off-by: Michal Simek &lt;michal.simek@xilinx.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial-uartlite: Move the uart register</title>
<updated>2018-11-09T16:45:07Z</updated>
<author>
<name>Shubhrajyoti Datta</name>
<email>shubhrajyoti.datta@xilinx.com</email>
</author>
<published>2018-10-16T10:18:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f33cf776617ba3b0f738cd70c31e0f62ea777a8d'/>
<id>urn:sha1:f33cf776617ba3b0f738cd70c31e0f62ea777a8d</id>
<content type='text'>
Move the uart register. This fixes the error path where the
clock disable is missed out.

Signed-off-by: Shubhrajyoti Datta &lt;shubhrajyoti.datta@xilinx.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: serial: uartlite: Use dynamic array for console port</title>
<updated>2018-09-18T14:07:24Z</updated>
<author>
<name>Shubhrajyoti Datta</name>
<email>shubhrajyoti.datta@xilinx.com</email>
</author>
<published>2018-08-06T08:52:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=deeb33e8fdd834770f75996c18153453d5af6c50'/>
<id>urn:sha1:deeb33e8fdd834770f75996c18153453d5af6c50</id>
<content type='text'>
Driver console functions are using pointer to static array with fixed
size. There can be only one serial console at the time which is found
by register_console(). register_console() is filling cons-&gt;index to
port-&gt;line value.

Signed-off-by: Shubhrajyoti Datta &lt;shubhrajyoti.datta@xilinx.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: serial: uartlite: remove console_init</title>
<updated>2018-09-18T14:07:23Z</updated>
<author>
<name>Shubhrajyoti Datta</name>
<email>shubhrajyoti.datta@xilinx.com</email>
</author>
<published>2018-08-06T08:52:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5f6825d1cef747f6677a833708d698c7df3c1bc8'/>
<id>urn:sha1:5f6825d1cef747f6677a833708d698c7df3c1bc8</id>
<content type='text'>
register_console is called twice once from

uart_add_one_port -&gt; uart_configure_port
remove the double call

Signed-off-by: Shubhrajyoti Datta &lt;shubhrajyoti.datta@xilinx.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: serial: uartlite: Move uart register to probe</title>
<updated>2018-09-18T14:07:23Z</updated>
<author>
<name>Shubhrajyoti Datta</name>
<email>shubhrajyoti.datta@xilinx.com</email>
</author>
<published>2018-08-06T08:52:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=415b43bdb00890f5698ceff3d3531d2daa98c5a1'/>
<id>urn:sha1:415b43bdb00890f5698ceff3d3531d2daa98c5a1</id>
<content type='text'>
Move uart register to probe.
This is in preparation of removing the hardcoding of number of uarts.

Signed-off-by: Shubhrajyoti Datta &lt;shubhrajyoti.datta@xilinx.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
