<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/tty/serial/uartlite.c, branch v4.14.286</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.14.286</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.14.286'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2019-10-17T20:43:29+00:00</updated>
<entry>
<title>serial: uartlite: fix exit path null pointer</title>
<updated>2019-10-17T20:43:29+00:00</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@infradead.org</email>
</author>
<published>2019-09-16T23:12:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bf6d0e32f31ec8270f42573efc8fab53ee25f72e'/>
<id>urn:sha1:bf6d0e32f31ec8270f42573efc8fab53ee25f72e</id>
<content type='text'>
commit a553add0846f355a28ed4e81134012e4a1e280c2 upstream.

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>uartlite: Adding a kernel parameter for the number of uartlites</title>
<updated>2017-03-17T05:14:30+00:00</updated>
<author>
<name>Sam Povilus</name>
<email>kernel.development@povil.us</email>
</author>
<published>2017-03-16T02:43:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b44b96a060f3fd06456214cac7dfdd3ddf0caf2b'/>
<id>urn:sha1:b44b96a060f3fd06456214cac7dfdd3ddf0caf2b</id>
<content type='text'>
The number of uartlites should be set by a kernel parameter instead of
using a #define. This allows the user to set the number of uartlites
using only kconfig and not modifying kernel source.

The uartlite is used by FPGAs that support a basically unlimited number
of uarts so limiting it at 16 dosn't make sense as users might need more
than that.

Signed-off-by: Sam Povilus &lt;kernel.development@povil.us&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial-uartlite: constify uart_ops structures</title>
<updated>2016-09-02T13:01:16+00:00</updated>
<author>
<name>Julia Lawall</name>
<email>Julia.Lawall@lip6.fr</email>
</author>
<published>2016-09-01T17:51:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=31d054dccc2cd840fb1e17e97021b92b3402c701'/>
<id>urn:sha1:31d054dccc2cd840fb1e17e97021b92b3402c701</id>
<content type='text'>
Check for uart_ops structures that are only stored in the ops field of a
uart_port structure.  This field is declared const, so uart_ops structures
that have this property can be declared as const also.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// &lt;smpl&gt;
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct uart_ops i@p = { ... };

@ok@
identifier r.i;
struct uart_port e;
position p;
@@
e.ops = &amp;i@p;

@bad@
position p != {r.p,ok.p};
identifier r.i;
struct uart_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct uart_ops i = { ... };
// &lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial-uartlite: Constify uartlite_be/uartlite_le</title>
<updated>2016-04-30T16:26:55+00:00</updated>
<author>
<name>Maarten Brock</name>
<email>m.brock@vanmierlo.com</email>
</author>
<published>2016-04-22T16:19:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=973ea59e8c466c54b6d1f0a080f3efda418cdc18'/>
<id>urn:sha1:973ea59e8c466c54b6d1f0a080f3efda418cdc18</id>
<content type='text'>
Made uartlite_be and uartlite_le constants.

Signed-off-by: Maarten Brock &lt;m.brock@vanmierlo.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Revert "serial-uartlite: Constify uartlite_be/uartlite_le"</title>
<updated>2016-04-19T06:15:38+00:00</updated>
<author>
<name>Sudip Mukherjee</name>
<email>sudipm.mukherjee@gmail.com</email>
</author>
<published>2016-04-11T14:53:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9220ebffda4aa23fe683c9ca6c94fb72d7c131c2'/>
<id>urn:sha1:9220ebffda4aa23fe683c9ca6c94fb72d7c131c2</id>
<content type='text'>
This reverts commit 2905697a82eaf20606ced164d853b52d1b94aaa8.

The commit introduced two build warnings:
drivers/tty/serial/uartlite.c: In function ‘ulite_request_port’:
drivers/tty/serial/uartlite.c:348:21: warning: assignment discards
			‘const’ qualifier from pointer target type
  port-&gt;private_data = &amp;uartlite_be;
                     ^
drivers/tty/serial/uartlite.c:354:22: warning: assignment discards
			‘const’ qualifier from pointer target type
   port-&gt;private_data = &amp;uartlite_le;
                      ^

Signed-off-by: Sudip Mukherjee &lt;sudip.mukherjee@codethink.co.uk&gt;
Cc: Maarten Brock &lt;m.brock@vanmierlo.com&gt;
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial-uartlite: Configure for rising edge irq trigger.</title>
<updated>2016-03-08T00:11:14+00:00</updated>
<author>
<name>Maarten Brock</name>
<email>m.brock@vanmierlo.com</email>
</author>
<published>2016-02-16T17:59:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=106020ccee79c7fcf3875c47000525d957c9bcf1'/>
<id>urn:sha1:106020ccee79c7fcf3875c47000525d957c9bcf1</id>
<content type='text'>
This device generates a short rising pulse on the interrupt request line.

Signed-off-by: Maarten Brock &lt;m.brock@vanmierlo.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial-uartlite: Spinlock inside the loop.</title>
<updated>2016-03-08T00:11:14+00:00</updated>
<author>
<name>Maarten Brock</name>
<email>m.brock@vanmierlo.com</email>
</author>
<published>2016-02-16T17:59:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=19606eaf0b7b791fd5ecb61017ce0b367cce74a0'/>
<id>urn:sha1:19606eaf0b7b791fd5ecb61017ce0b367cce74a0</id>
<content type='text'>
Better to hold the spinlock as short as possible.

Signed-off-by: Maarten Brock &lt;m.brock@vanmierlo.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial-uartlite: Constify uartlite_be/uartlite_le</title>
<updated>2016-03-08T00:11:14+00:00</updated>
<author>
<name>Maarten Brock</name>
<email>m.brock@vanmierlo.com</email>
</author>
<published>2016-02-16T17:59:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2905697a82eaf20606ced164d853b52d1b94aaa8'/>
<id>urn:sha1:2905697a82eaf20606ced164d853b52d1b94aaa8</id>
<content type='text'>
Made uartlite_be and uartlite_le constants.

Signed-off-by: Maarten Brock &lt;m.brock@vanmierlo.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial-uartlite: Enlarge maximum nr of devices to 16.</title>
<updated>2016-03-08T00:11:14+00:00</updated>
<author>
<name>Maarten Brock</name>
<email>m.brock@vanmierlo.com</email>
</author>
<published>2016-02-16T17:59:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=acf5e6c88914333f8e1b66d9968c65112a97e846'/>
<id>urn:sha1:acf5e6c88914333f8e1b66d9968c65112a97e846</id>
<content type='text'>
This device is ideal to use when you need a lot of uarts in your FPGA.
Try not to force all those users to patch their kernel.

Signed-off-by: Maarten Brock &lt;m.brock@vanmierlo.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial-uartlite: fix missing locking in isr</title>
<updated>2016-02-07T06:56:43+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@libc.org</email>
</author>
<published>2016-01-08T20:33:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9e370d2c9f59a63dda0ced3ecd1b55498d97c449'/>
<id>urn:sha1:9e370d2c9f59a63dda0ced3ecd1b55498d97c449</id>
<content type='text'>
The uartlite driver suffers from missing/duplicate/corrupted character
data when the interrupt handler runs concurrently with access to the
device from another cpu. Take the port spinlock to exclude concurrent
access.

Signed-off-by: Rich Felker &lt;dalias@libc.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
