diff options
author | Xiubo Li <xiubli@redhat.com> | 2019-02-13 19:29:33 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-02-15 10:09:14 +0300 |
commit | 3f400c2c2e7043b64c65d9b8709a0b353e1f8384 (patch) | |
tree | 4c6b97d1e0edee649cd84829c3e5ad0f40545a56 /include/asm-generic/delay.h | |
parent | 8a68c55d15af981361ce324d90ee06e8276d330c (diff) | |
download | linux-3f400c2c2e7043b64c65d9b8709a0b353e1f8384.tar.xz |
uio: change to use the mutex lock instead of the spin lock
commit 543af5861f41af0a5d2432f6fb5976af50f9cee5 upstream.
We are hitting a regression with the following commit:
commit a93e7b331568227500186a465fee3c2cb5dffd1f
Author: Hamish Martin <hamish.martin@alliedtelesis.co.nz>
Date: Mon May 14 13:32:23 2018 +1200
uio: Prevent device destruction while fds are open
The problem is the addition of spin_lock_irqsave in uio_write. This
leads to hitting uio_write -> copy_from_user -> _copy_from_user ->
might_fault and the logs filling up with sleeping warnings.
I also noticed some uio drivers allocate memory, sleep, grab mutexes
from callouts like open() and release and uio is now doing
spin_lock_irqsave while calling them.
Reported-by: Mike Christie <mchristi@redhat.com>
CC: Hamish Martin <hamish.martin@alliedtelesis.co.nz>
Reviewed-by: Hamish Martin <hamish.martin@alliedtelesis.co.nz>
Signed-off-by: Xiubo Li <xiubli@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tommi Rantala <tommi.t.rantala@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/asm-generic/delay.h')
0 files changed, 0 insertions, 0 deletions