<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/uio, branch v4.19.2</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>uio: ensure class is registered before devices</title>
<updated>2018-11-13T19:08:37+00:00</updated>
<author>
<name>Alexandre Belloni</name>
<email>alexandre.belloni@bootlin.com</email>
</author>
<published>2018-08-16T07:39:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c21099be02331a82c28a7bad1d956b6cd64a3782'/>
<id>c21099be02331a82c28a7bad1d956b6cd64a3782</id>
<content type='text'>
[ Upstream commit ae61cf5b9913027c6953a79ed3894da4f47061bd ]

When both uio and the uio drivers are built in the kernel, it is possible
for a driver to register devices before the uio class is registered.

This may result in a NULL pointer dereference later on in
get_device_parent() when accessing the class glue_dirs spinlock.

The trace looks like that:

Unable to handle kernel NULL pointer dereference at virtual address 00000140
[...]
[&lt;ffff0000089cc234&gt;] _raw_spin_lock+0x14/0x48
[&lt;ffff0000084f56bc&gt;] device_add+0x154/0x6a0
[&lt;ffff0000084f5e48&gt;] device_create_groups_vargs+0x120/0x128
[&lt;ffff0000084f5edc&gt;] device_create+0x54/0x60
[&lt;ffff0000086e72c0&gt;] __uio_register_device+0x120/0x4a8
[&lt;ffff000008528b7c&gt;] jaguar2_pci_probe+0x2d4/0x558
[&lt;ffff0000083fc18c&gt;] local_pci_probe+0x3c/0xb8
[&lt;ffff0000083fd81c&gt;] pci_device_probe+0x11c/0x180
[&lt;ffff0000084f88bc&gt;] driver_probe_device+0x22c/0x2d8
[&lt;ffff0000084f8a24&gt;] __driver_attach+0xbc/0xc0
[&lt;ffff0000084f69fc&gt;] bus_for_each_dev+0x4c/0x98
[&lt;ffff0000084f81b8&gt;] driver_attach+0x20/0x28
[&lt;ffff0000084f7d08&gt;] bus_add_driver+0x1b8/0x228
[&lt;ffff0000084f93c0&gt;] driver_register+0x60/0xf8
[&lt;ffff0000083fb918&gt;] __pci_register_driver+0x40/0x48

Return EPROBE_DEFER in that case so the driver can register the device
later.

Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.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>
[ Upstream commit ae61cf5b9913027c6953a79ed3894da4f47061bd ]

When both uio and the uio drivers are built in the kernel, it is possible
for a driver to register devices before the uio class is registered.

This may result in a NULL pointer dereference later on in
get_device_parent() when accessing the class glue_dirs spinlock.

The trace looks like that:

Unable to handle kernel NULL pointer dereference at virtual address 00000140
[...]
[&lt;ffff0000089cc234&gt;] _raw_spin_lock+0x14/0x48
[&lt;ffff0000084f56bc&gt;] device_add+0x154/0x6a0
[&lt;ffff0000084f5e48&gt;] device_create_groups_vargs+0x120/0x128
[&lt;ffff0000084f5edc&gt;] device_create+0x54/0x60
[&lt;ffff0000086e72c0&gt;] __uio_register_device+0x120/0x4a8
[&lt;ffff000008528b7c&gt;] jaguar2_pci_probe+0x2d4/0x558
[&lt;ffff0000083fc18c&gt;] local_pci_probe+0x3c/0xb8
[&lt;ffff0000083fd81c&gt;] pci_device_probe+0x11c/0x180
[&lt;ffff0000084f88bc&gt;] driver_probe_device+0x22c/0x2d8
[&lt;ffff0000084f8a24&gt;] __driver_attach+0xbc/0xc0
[&lt;ffff0000084f69fc&gt;] bus_for_each_dev+0x4c/0x98
[&lt;ffff0000084f81b8&gt;] driver_attach+0x20/0x28
[&lt;ffff0000084f7d08&gt;] bus_add_driver+0x1b8/0x228
[&lt;ffff0000084f93c0&gt;] driver_register+0x60/0xf8
[&lt;ffff0000083fb918&gt;] __pci_register_driver+0x40/0x48

Return EPROBE_DEFER in that case so the driver can register the device
later.

Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'char-misc-4.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc</title>
<updated>2018-08-19T16:30:44+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2018-08-19T16:30:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=1d0926e99de7b486321e3db924b445531eea5e18'/>
<id>1d0926e99de7b486321e3db924b445531eea5e18</id>
<content type='text'>
Pull UIO fix from Greg KH:
 "Here is a single UIO fix that I forgot to send before 4.18-final came
  out. It reverts a UIO patch that went in the 4.18 development window
  that was causing problems.

  This patch has been in linux-next for a while with no problems, I just
  forgot to send it earlier, or as part of the larger char/misc patch
  series from yesterday, my fault"

* tag 'char-misc-4.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  Revert "uio: use request_threaded_irq instead"
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull UIO fix from Greg KH:
 "Here is a single UIO fix that I forgot to send before 4.18-final came
  out. It reverts a UIO patch that went in the 4.18 development window
  that was causing problems.

  This patch has been in linux-next for a while with no problems, I just
  forgot to send it earlier, or as part of the larger char/misc patch
  series from yesterday, my fault"

* tag 'char-misc-4.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  Revert "uio: use request_threaded_irq instead"
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "uio: use request_threaded_irq instead"</title>
<updated>2018-08-12T15:30:58+00:00</updated>
<author>
<name>Xiubo Li</name>
<email>xiubli@redhat.com</email>
</author>
<published>2018-08-12T11:58:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=3d27c4de8d4fb2d4099ff324671792aa2578c6f9'/>
<id>3d27c4de8d4fb2d4099ff324671792aa2578c6f9</id>
<content type='text'>
Since mutex lock in irq hanler is useless currently, here will
remove it together with it.

This reverts commit 9421e45f5ff3d558cf8b75a8cc0824530caf3453.

Reported-by: james.r.harris@intel.com
CC: Ahsan Atta &lt;ahsan.atta@intel.com&gt;
Signed-off-by: Xiubo Li &lt;xiubli@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>
Since mutex lock in irq hanler is useless currently, here will
remove it together with it.

This reverts commit 9421e45f5ff3d558cf8b75a8cc0824530caf3453.

Reported-by: james.r.harris@intel.com
CC: Ahsan Atta &lt;ahsan.atta@intel.com&gt;
Signed-off-by: Xiubo Li &lt;xiubli@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>uio: potential double frees if __uio_register_device() fails</title>
<updated>2018-08-02T08:42:25+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2018-08-02T08:24:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=f019f07ecf6a6b8bd6d7853bce70925d90af02d1'/>
<id>f019f07ecf6a6b8bd6d7853bce70925d90af02d1</id>
<content type='text'>
The uio_unregister_device() function assumes that if "info-&gt;uio_dev" is
non-NULL that means "info" is fully allocated.  Setting info-&gt;uio_de
has to be the last thing in the function.

In the current code, if request_threaded_irq() fails then we return with
info-&gt;uio_dev set to non-NULL but info is not fully allocated and it can
lead to double frees.

Fixes: beafc54c4e2f ("UIO: Add the User IO core code")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.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>
The uio_unregister_device() function assumes that if "info-&gt;uio_dev" is
non-NULL that means "info" is fully allocated.  Setting info-&gt;uio_de
has to be the last thing in the function.

In the current code, if request_threaded_irq() fails then we return with
info-&gt;uio_dev set to non-NULL but info is not fully allocated and it can
lead to double frees.

Fixes: beafc54c4e2f ("UIO: Add the User IO core code")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>uio: fix possible circular locking dependency</title>
<updated>2018-08-02T08:14:26+00:00</updated>
<author>
<name>Xiubo Li</name>
<email>xiubli@redhat.com</email>
</author>
<published>2018-07-30T07:11:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=b34e9a15b37b8ddbf06a4da142b0c39c74211eb4'/>
<id>b34e9a15b37b8ddbf06a4da142b0c39c74211eb4</id>
<content type='text'>
The call trace:
XXX/1910 is trying to acquire lock:
 (&amp;mm-&gt;mmap_sem){++++++}, at: [&lt;ffffffff97008c87&gt;] might_fault+0x57/0xb0

but task is already holding lock:
 (&amp;idev-&gt;info_lock){+.+...}, at: [&lt;ffffffffc0638a06&gt;] uio_write+0x46/0x130 [uio]

which lock already depends on the new lock.

the existing dependency chain (in reverse order) is:

-&gt; #1 (&amp;idev-&gt;info_lock){+.+...}:
       [&lt;ffffffff96f31fc9&gt;] lock_acquire+0x99/0x1e0
       [&lt;ffffffff975edad3&gt;] mutex_lock_nested+0x93/0x410
       [&lt;ffffffffc063873d&gt;] uio_mmap+0x2d/0x170 [uio]
       [&lt;ffffffff97016b58&gt;] mmap_region+0x428/0x650
       [&lt;ffffffff97017138&gt;] do_mmap+0x3b8/0x4e0
       [&lt;ffffffff96ffaba3&gt;] vm_mmap_pgoff+0xd3/0x120
       [&lt;ffffffff97015261&gt;] SyS_mmap_pgoff+0x1f1/0x270
       [&lt;ffffffff96e387c2&gt;] SyS_mmap+0x22/0x30
       [&lt;ffffffff975ff315&gt;] system_call_fastpath+0x1c/0x21

-&gt; #0 (&amp;mm-&gt;mmap_sem){++++++}:
       [&lt;ffffffff96f30e9c&gt;] __lock_acquire+0xdac/0x15f0
       [&lt;ffffffff96f31fc9&gt;] lock_acquire+0x99/0x1e0
       [&lt;ffffffff97008cb4&gt;] might_fault+0x84/0xb0
       [&lt;ffffffffc0638a74&gt;] uio_write+0xb4/0x130 [uio]
       [&lt;ffffffff9706ffa3&gt;] vfs_write+0xc3/0x1f0
       [&lt;ffffffff97070e2a&gt;] SyS_write+0x8a/0x100
       [&lt;ffffffff975ff315&gt;] system_call_fastpath+0x1c/0x21

other info that might help us debug this:
 Possible unsafe locking scenario:
       CPU0                    CPU1
       ----                    ----
  lock(&amp;idev-&gt;info_lock);
                               lock(&amp;mm-&gt;mmap_sem);
                               lock(&amp;idev-&gt;info_lock);
  lock(&amp;mm-&gt;mmap_sem);

 *** DEADLOCK ***
1 lock held by XXX/1910:
 #0:  (&amp;idev-&gt;info_lock){+.+...}, at: [&lt;ffffffffc0638a06&gt;] uio_write+0x46/0x130 [uio]

stack backtrace:
CPU: 0 PID: 1910 Comm: XXX Kdump: loaded Not tainted #1
Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 05/19/2017
Call Trace:
 [&lt;ffffffff975e9211&gt;] dump_stack+0x19/0x1b
 [&lt;ffffffff975e260a&gt;] print_circular_bug+0x1f9/0x207
 [&lt;ffffffff96f2f6a7&gt;] check_prevs_add+0x957/0x960
 [&lt;ffffffff96f30e9c&gt;] __lock_acquire+0xdac/0x15f0
 [&lt;ffffffff96f2fb19&gt;] ? mark_held_locks+0xb9/0x140
 [&lt;ffffffff96f31fc9&gt;] lock_acquire+0x99/0x1e0
 [&lt;ffffffff97008c87&gt;] ? might_fault+0x57/0xb0
 [&lt;ffffffff97008cb4&gt;] might_fault+0x84/0xb0
 [&lt;ffffffff97008c87&gt;] ? might_fault+0x57/0xb0
 [&lt;ffffffffc0638a74&gt;] uio_write+0xb4/0x130 [uio]
 [&lt;ffffffff9706ffa3&gt;] vfs_write+0xc3/0x1f0
 [&lt;ffffffff9709349c&gt;] ? fget_light+0xfc/0x510
 [&lt;ffffffff97070e2a&gt;] SyS_write+0x8a/0x100
 [&lt;ffffffff975ff315&gt;] system_call_fastpath+0x1c/0x21

Signed-off-by: Xiubo Li &lt;xiubli@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>
The call trace:
XXX/1910 is trying to acquire lock:
 (&amp;mm-&gt;mmap_sem){++++++}, at: [&lt;ffffffff97008c87&gt;] might_fault+0x57/0xb0

but task is already holding lock:
 (&amp;idev-&gt;info_lock){+.+...}, at: [&lt;ffffffffc0638a06&gt;] uio_write+0x46/0x130 [uio]

which lock already depends on the new lock.

the existing dependency chain (in reverse order) is:

-&gt; #1 (&amp;idev-&gt;info_lock){+.+...}:
       [&lt;ffffffff96f31fc9&gt;] lock_acquire+0x99/0x1e0
       [&lt;ffffffff975edad3&gt;] mutex_lock_nested+0x93/0x410
       [&lt;ffffffffc063873d&gt;] uio_mmap+0x2d/0x170 [uio]
       [&lt;ffffffff97016b58&gt;] mmap_region+0x428/0x650
       [&lt;ffffffff97017138&gt;] do_mmap+0x3b8/0x4e0
       [&lt;ffffffff96ffaba3&gt;] vm_mmap_pgoff+0xd3/0x120
       [&lt;ffffffff97015261&gt;] SyS_mmap_pgoff+0x1f1/0x270
       [&lt;ffffffff96e387c2&gt;] SyS_mmap+0x22/0x30
       [&lt;ffffffff975ff315&gt;] system_call_fastpath+0x1c/0x21

-&gt; #0 (&amp;mm-&gt;mmap_sem){++++++}:
       [&lt;ffffffff96f30e9c&gt;] __lock_acquire+0xdac/0x15f0
       [&lt;ffffffff96f31fc9&gt;] lock_acquire+0x99/0x1e0
       [&lt;ffffffff97008cb4&gt;] might_fault+0x84/0xb0
       [&lt;ffffffffc0638a74&gt;] uio_write+0xb4/0x130 [uio]
       [&lt;ffffffff9706ffa3&gt;] vfs_write+0xc3/0x1f0
       [&lt;ffffffff97070e2a&gt;] SyS_write+0x8a/0x100
       [&lt;ffffffff975ff315&gt;] system_call_fastpath+0x1c/0x21

other info that might help us debug this:
 Possible unsafe locking scenario:
       CPU0                    CPU1
       ----                    ----
  lock(&amp;idev-&gt;info_lock);
                               lock(&amp;mm-&gt;mmap_sem);
                               lock(&amp;idev-&gt;info_lock);
  lock(&amp;mm-&gt;mmap_sem);

 *** DEADLOCK ***
1 lock held by XXX/1910:
 #0:  (&amp;idev-&gt;info_lock){+.+...}, at: [&lt;ffffffffc0638a06&gt;] uio_write+0x46/0x130 [uio]

stack backtrace:
CPU: 0 PID: 1910 Comm: XXX Kdump: loaded Not tainted #1
Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 05/19/2017
Call Trace:
 [&lt;ffffffff975e9211&gt;] dump_stack+0x19/0x1b
 [&lt;ffffffff975e260a&gt;] print_circular_bug+0x1f9/0x207
 [&lt;ffffffff96f2f6a7&gt;] check_prevs_add+0x957/0x960
 [&lt;ffffffff96f30e9c&gt;] __lock_acquire+0xdac/0x15f0
 [&lt;ffffffff96f2fb19&gt;] ? mark_held_locks+0xb9/0x140
 [&lt;ffffffff96f31fc9&gt;] lock_acquire+0x99/0x1e0
 [&lt;ffffffff97008c87&gt;] ? might_fault+0x57/0xb0
 [&lt;ffffffff97008cb4&gt;] might_fault+0x84/0xb0
 [&lt;ffffffff97008c87&gt;] ? might_fault+0x57/0xb0
 [&lt;ffffffffc0638a74&gt;] uio_write+0xb4/0x130 [uio]
 [&lt;ffffffff9706ffa3&gt;] vfs_write+0xc3/0x1f0
 [&lt;ffffffff9709349c&gt;] ? fget_light+0xfc/0x510
 [&lt;ffffffff97070e2a&gt;] SyS_write+0x8a/0x100
 [&lt;ffffffff975ff315&gt;] system_call_fastpath+0x1c/0x21

Signed-off-by: Xiubo Li &lt;xiubli@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>uio: pruss: fix error handling in probe</title>
<updated>2018-08-02T08:14:26+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2018-08-02T07:15:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=95883676e34ab93f600787cc9831707bcdad4398'/>
<id>95883676e34ab93f600787cc9831707bcdad4398</id>
<content type='text'>
There are two bugs here.  First the error codes weren't set on several
paths.  And second, if the call to request_threaded_irq() inside
uio_register_device() fails then it would lead to a double free when
we call uio_unregister_device() inside pruss_cleanup().

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.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>
There are two bugs here.  First the error codes weren't set on several
paths.  And second, if the call to request_threaded_irq() inside
uio_register_device() fails then it would lead to a double free when
we call uio_unregister_device() inside pruss_cleanup().

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>uio: add SPDX license tags</title>
<updated>2018-07-21T13:41:20+00:00</updated>
<author>
<name>Stephen Hemminger</name>
<email>stephen@networkplumber.org</email>
</author>
<published>2018-07-21T13:31:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=bce5c2ea350f5a57353295534faba00b28cadf14'/>
<id>bce5c2ea350f5a57353295534faba00b28cadf14</id>
<content type='text'>
For those without any license text present or short reference
to GPL, add SPDX tag.

Signed-off-by: Stephen Hemminger &lt;sthemmin@microsoft.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>
For those without any license text present or short reference
to GPL, add SPDX tag.

Signed-off-by: Stephen Hemminger &lt;sthemmin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>uio: fix wrong return value from uio_mmap()</title>
<updated>2018-07-21T06:45:24+00:00</updated>
<author>
<name>Hailong Liu</name>
<email>liu.hailong6@zte.com.cn</email>
</author>
<published>2018-07-20T00:31:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=e7de2590f18a272e63732b9d519250d1b522b2c4'/>
<id>e7de2590f18a272e63732b9d519250d1b522b2c4</id>
<content type='text'>
uio_mmap has multiple fail paths to set return value to nonzero then
goto out. However, it always returns *0* from the *out* at end, and
this will mislead callers who check the return value of this function.

Fixes: 57c5f4df0a5a0ee ("uio: fix crash after the device is unregistered")
CC: Xiubo Li &lt;xiubli@redhat.com&gt;
Signed-off-by: Hailong Liu &lt;liu.hailong6@zte.com.cn&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Jiang Biao &lt;jiang.biao2@zte.com.cn&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>
uio_mmap has multiple fail paths to set return value to nonzero then
goto out. However, it always returns *0* from the *out* at end, and
this will mislead callers who check the return value of this function.

Fixes: 57c5f4df0a5a0ee ("uio: fix crash after the device is unregistered")
CC: Xiubo Li &lt;xiubli@redhat.com&gt;
Signed-off-by: Hailong Liu &lt;liu.hailong6@zte.com.cn&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Jiang Biao &lt;jiang.biao2@zte.com.cn&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>uio: add SPDX license tag</title>
<updated>2018-07-21T06:44:08+00:00</updated>
<author>
<name>Stephen Hemminger</name>
<email>stephen@networkplumber.org</email>
</author>
<published>2018-07-20T22:11:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=fbb5858c1467ef8feccc910ac9e9f529186a9f9d'/>
<id>fbb5858c1467ef8feccc910ac9e9f529186a9f9d</id>
<content type='text'>
Replace short statement in comment with proper SPDX
license tag.

Signed-off-by: Stephen Hemminger &lt;stephen@networkplumber.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>
Replace short statement in comment with proper SPDX
license tag.

Signed-off-by: Stephen Hemminger &lt;stephen@networkplumber.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>uio: fix crash after the device is unregistered</title>
<updated>2018-07-07T14:57:35+00:00</updated>
<author>
<name>Xiubo Li</name>
<email>xiubli@redhat.com</email>
</author>
<published>2018-07-07T02:05:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=57c5f4df0a5a0ee83df799991251e2ee93a5e4e9'/>
<id>57c5f4df0a5a0ee83df799991251e2ee93a5e4e9</id>
<content type='text'>
For the target_core_user use case, after the device is unregistered
it maybe still opened in user space, then the kernel will crash, like:

[  251.163692] BUG: unable to handle kernel NULL pointer dereference at 0000000000000008
[  251.163820] IP: [&lt;ffffffffc0736213&gt;] show_name+0x23/0x40 [uio]
[  251.163965] PGD 8000000062694067 PUD 62696067 PMD 0
[  251.164097] Oops: 0000 [#1] SMP
...
[  251.165605]  e1000 mptscsih mptbase drm_panel_orientation_quirks dm_mirror dm_region_hash dm_log dm_mod
[  251.166014] CPU: 0 PID: 13380 Comm: tcmu-runner Kdump: loaded Not tainted 3.10.0-916.el7.test.x86_64 #1
[  251.166381] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 05/19/2017
[  251.166747] task: ffff971eb91db0c0 ti: ffff971e9e384000 task.ti: ffff971e9e384000
[  251.167137] RIP: 0010:[&lt;ffffffffc0736213&gt;]  [&lt;ffffffffc0736213&gt;] show_name+0x23/0x40 [uio]
[  251.167563] RSP: 0018:ffff971e9e387dc8  EFLAGS: 00010282
[  251.167978] RAX: 0000000000000000 RBX: ffff971e9e3f8000 RCX: ffff971eb8368d98
[  251.168408] RDX: ffff971e9e3f8000 RSI: ffffffffc0738084 RDI: ffff971e9e3f8000
[  251.168856] RBP: ffff971e9e387dd0 R08: ffff971eb8bc0018 R09: 0000000000000000
[  251.169296] R10: 0000000000001000 R11: ffffffffa09d444d R12: ffffffffa1076e80
[  251.169750] R13: ffff971e9e387f18 R14: 0000000000000001 R15: ffff971e9cfb1c80
[  251.170213] FS:  00007ff37d175880(0000) GS:ffff971ebb600000(0000) knlGS:0000000000000000
[  251.170693] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  251.171248] CR2: 0000000000000008 CR3: 00000000001f6000 CR4: 00000000003607f0
[  251.172071] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[  251.172640] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[  251.173236] Call Trace:
[  251.173789]  [&lt;ffffffffa0c9b2d3&gt;] dev_attr_show+0x23/0x60
[  251.174356]  [&lt;ffffffffa0f561b2&gt;] ? mutex_lock+0x12/0x2f
[  251.174892]  [&lt;ffffffffa0ac6d9f&gt;] sysfs_kf_seq_show+0xcf/0x1f0
[  251.175433]  [&lt;ffffffffa0ac54e6&gt;] kernfs_seq_show+0x26/0x30
[  251.175981]  [&lt;ffffffffa0a63be0&gt;] seq_read+0x110/0x3f0
[  251.176609]  [&lt;ffffffffa0ac5d45&gt;] kernfs_fop_read+0xf5/0x160
[  251.177158]  [&lt;ffffffffa0a3d3af&gt;] vfs_read+0x9f/0x170
[  251.177707]  [&lt;ffffffffa0a3e27f&gt;] SyS_read+0x7f/0xf0
[  251.178268]  [&lt;ffffffffa0f648af&gt;] system_call_fastpath+0x1c/0x21
[  251.178823] Code: 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 55 48 89 e5 53 48 89 d3 e8 7e 96 56 e0 48 8b 80 d8 02 00 00 48 89 df 48 c7 c6 84 80 73 c0 &lt;48&gt; 8b 50 08 31 c0 e8 e2 67 44 e0 5b 48 98 5d c3 0f 1f 00 66 2e
[  251.180115] RIP  [&lt;ffffffffc0736213&gt;] show_name+0x23/0x40 [uio]
[  251.180820]  RSP &lt;ffff971e9e387dc8&gt;
[  251.181473] CR2: 0000000000000008

CC: Hamish Martin &lt;hamish.martin@alliedtelesis.co.nz&gt;
CC: Mike Christie &lt;mchristi@redhat.com&gt;
Reviewed-by: Hamish Martin &lt;hamish.martin@alliedtelesis.co.nz&gt;
Signed-off-by: Xiubo Li &lt;xiubli@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>
For the target_core_user use case, after the device is unregistered
it maybe still opened in user space, then the kernel will crash, like:

[  251.163692] BUG: unable to handle kernel NULL pointer dereference at 0000000000000008
[  251.163820] IP: [&lt;ffffffffc0736213&gt;] show_name+0x23/0x40 [uio]
[  251.163965] PGD 8000000062694067 PUD 62696067 PMD 0
[  251.164097] Oops: 0000 [#1] SMP
...
[  251.165605]  e1000 mptscsih mptbase drm_panel_orientation_quirks dm_mirror dm_region_hash dm_log dm_mod
[  251.166014] CPU: 0 PID: 13380 Comm: tcmu-runner Kdump: loaded Not tainted 3.10.0-916.el7.test.x86_64 #1
[  251.166381] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 05/19/2017
[  251.166747] task: ffff971eb91db0c0 ti: ffff971e9e384000 task.ti: ffff971e9e384000
[  251.167137] RIP: 0010:[&lt;ffffffffc0736213&gt;]  [&lt;ffffffffc0736213&gt;] show_name+0x23/0x40 [uio]
[  251.167563] RSP: 0018:ffff971e9e387dc8  EFLAGS: 00010282
[  251.167978] RAX: 0000000000000000 RBX: ffff971e9e3f8000 RCX: ffff971eb8368d98
[  251.168408] RDX: ffff971e9e3f8000 RSI: ffffffffc0738084 RDI: ffff971e9e3f8000
[  251.168856] RBP: ffff971e9e387dd0 R08: ffff971eb8bc0018 R09: 0000000000000000
[  251.169296] R10: 0000000000001000 R11: ffffffffa09d444d R12: ffffffffa1076e80
[  251.169750] R13: ffff971e9e387f18 R14: 0000000000000001 R15: ffff971e9cfb1c80
[  251.170213] FS:  00007ff37d175880(0000) GS:ffff971ebb600000(0000) knlGS:0000000000000000
[  251.170693] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  251.171248] CR2: 0000000000000008 CR3: 00000000001f6000 CR4: 00000000003607f0
[  251.172071] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[  251.172640] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[  251.173236] Call Trace:
[  251.173789]  [&lt;ffffffffa0c9b2d3&gt;] dev_attr_show+0x23/0x60
[  251.174356]  [&lt;ffffffffa0f561b2&gt;] ? mutex_lock+0x12/0x2f
[  251.174892]  [&lt;ffffffffa0ac6d9f&gt;] sysfs_kf_seq_show+0xcf/0x1f0
[  251.175433]  [&lt;ffffffffa0ac54e6&gt;] kernfs_seq_show+0x26/0x30
[  251.175981]  [&lt;ffffffffa0a63be0&gt;] seq_read+0x110/0x3f0
[  251.176609]  [&lt;ffffffffa0ac5d45&gt;] kernfs_fop_read+0xf5/0x160
[  251.177158]  [&lt;ffffffffa0a3d3af&gt;] vfs_read+0x9f/0x170
[  251.177707]  [&lt;ffffffffa0a3e27f&gt;] SyS_read+0x7f/0xf0
[  251.178268]  [&lt;ffffffffa0f648af&gt;] system_call_fastpath+0x1c/0x21
[  251.178823] Code: 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 55 48 89 e5 53 48 89 d3 e8 7e 96 56 e0 48 8b 80 d8 02 00 00 48 89 df 48 c7 c6 84 80 73 c0 &lt;48&gt; 8b 50 08 31 c0 e8 e2 67 44 e0 5b 48 98 5d c3 0f 1f 00 66 2e
[  251.180115] RIP  [&lt;ffffffffc0736213&gt;] show_name+0x23/0x40 [uio]
[  251.180820]  RSP &lt;ffff971e9e387dc8&gt;
[  251.181473] CR2: 0000000000000008

CC: Hamish Martin &lt;hamish.martin@alliedtelesis.co.nz&gt;
CC: Mike Christie &lt;mchristi@redhat.com&gt;
Reviewed-by: Hamish Martin &lt;hamish.martin@alliedtelesis.co.nz&gt;
Signed-off-by: Xiubo Li &lt;xiubli@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
