Home Home > GIT Browse > stable
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2019-07-14 11:33:41 +0200
committerJiri Slaby <jslaby@suse.cz>2019-07-14 11:33:55 +0200
commited17614b319b636157affd8ddc0ede86394e1d1a (patch)
tree5650dde477dafba229fccadd7ae40724e8ae0ea2
parentadf22bdff117eb411ffe5a1acf7fcb8589578e7e (diff)
staging: vchiq: make wait events interruptible (bnc#1012628).
-rw-r--r--patches.kernel.org/5.2.1-053-staging-vchiq-make-wait-events-interruptible.patch54
-rw-r--r--series.conf1
2 files changed, 55 insertions, 0 deletions
diff --git a/patches.kernel.org/5.2.1-053-staging-vchiq-make-wait-events-interruptible.patch b/patches.kernel.org/5.2.1-053-staging-vchiq-make-wait-events-interruptible.patch
new file mode 100644
index 0000000000..119901ab83
--- /dev/null
+++ b/patches.kernel.org/5.2.1-053-staging-vchiq-make-wait-events-interruptible.patch
@@ -0,0 +1,54 @@
+From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
+Date: Thu, 9 May 2019 16:31:35 +0200
+Subject: [PATCH] staging: vchiq: make wait events interruptible
+References: bnc#1012628
+Patch-mainline: 5.2.1
+Git-commit: 77cf3f5dcf35c8f547f075213dbc15146d44cc76
+
+commit 77cf3f5dcf35c8f547f075213dbc15146d44cc76 upstream.
+
+The killable version of wait_event() is meant to be used on situations
+where it should not fail at all costs, but still have the convenience of
+being able to kill it if really necessary. Wait events in VCHIQ doesn't
+fit this criteria, as it's mainly used as an interface to V4L2 and ALSA
+devices.
+
+Fixes: 852b2876a8a8 ("staging: vchiq: rework remove_event handling")
+Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
+Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ .../vc04_services/interface/vchiq_arm/vchiq_core.c | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
+index 0c387b6473a5..7eb3f33eaef8 100644
+--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
++++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
+@@ -395,13 +395,21 @@ remote_event_create(wait_queue_head_t *wq, struct remote_event *event)
+ init_waitqueue_head(wq);
+ }
+
++/*
++ * All the event waiting routines in VCHIQ used a custom semaphore
++ * implementation that filtered most signals. This achieved a behaviour similar
++ * to the "killable" family of functions. While cleaning up this code all the
++ * routines where switched to the "interruptible" family of functions, as the
++ * former was deemed unjustified and the use "killable" set all VCHIQ's
++ * threads in D state.
++ */
+ static inline int
+ remote_event_wait(wait_queue_head_t *wq, struct remote_event *event)
+ {
+ if (!event->fired) {
+ event->armed = 1;
+ dsb(sy);
+- if (wait_event_killable(*wq, event->fired)) {
++ if (wait_event_interruptible(*wq, event->fired)) {
+ event->armed = 0;
+ return 0;
+ }
+--
+2.22.0
+
diff --git a/series.conf b/series.conf
index 6312e5a058..29afb9695c 100644
--- a/series.conf
+++ b/series.conf
@@ -79,6 +79,7 @@
patches.kernel.org/5.2.1-050-Revert-x86-build-Move-_etext-to-actual-end-of-..patch
patches.kernel.org/5.2.1-051-VMCI-Fix-integer-overflow-in-VMCI-handle-arrays.patch
patches.kernel.org/5.2.1-052-staging-vchiq_2835_arm-revert-quit-using-custom.patch
+ patches.kernel.org/5.2.1-053-staging-vchiq-make-wait-events-interruptible.patch
########################################################
# Build fixes that apply to the vanilla kernel too.