]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/3.18.103/s390-qeth-when-thread-completes-wake-up-all-waiters.patch
Linux 4.14.95
[thirdparty/kernel/stable-queue.git] / releases / 3.18.103 / s390-qeth-when-thread-completes-wake-up-all-waiters.patch
CommitLineData
66d1cac4
GKH
1From foo@baz Thu Mar 29 08:53:48 CEST 2018
2From: Julian Wiedmann <jwi@linux.vnet.ibm.com>
3Date: Tue, 20 Mar 2018 07:59:13 +0100
4Subject: s390/qeth: when thread completes, wake up all waiters
5
6From: Julian Wiedmann <jwi@linux.vnet.ibm.com>
7
8
9[ Upstream commit 1063e432bb45be209427ed3f1ca3908e4aa3c7d7 ]
10
11qeth_wait_for_threads() is potentially called by multiple users, make
12sure to notify all of them after qeth_clear_thread_running_bit()
13adjusted the thread_running_mask. With no timeout, callers would
14otherwise stall.
15
16Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com>
17Signed-off-by: David S. Miller <davem@davemloft.net>
18Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
19---
20 drivers/s390/net/qeth_core_main.c | 2 +-
21 1 file changed, 1 insertion(+), 1 deletion(-)
22
23--- a/drivers/s390/net/qeth_core_main.c
24+++ b/drivers/s390/net/qeth_core_main.c
25@@ -944,7 +944,7 @@ void qeth_clear_thread_running_bit(struc
26 spin_lock_irqsave(&card->thread_mask_lock, flags);
27 card->thread_running_mask &= ~thread;
28 spin_unlock_irqrestore(&card->thread_mask_lock, flags);
29- wake_up(&card->wait_q);
30+ wake_up_all(&card->wait_q);
31 }
32 EXPORT_SYMBOL_GPL(qeth_clear_thread_running_bit);
33