]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/suse-2.6.27.25/patches.arch/s390-12-12-zfcp_wka_wait_refcount.patch
Reenabled linux-xen and xen-image build
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.arch / s390-12-12-zfcp_wka_wait_refcount.patch
CommitLineData
00e5a55c
BS
1From: Gerald Schaefer <geraldsc@de.ibm.com>
2Subject: zfcp: deadlock between scheduled task, ERP and scan_work
3References: bnc#487755,LTC#52845
4
5Symptom: I/O stalls due to a pending ERP action.
6Problem: Under certain timing constraints a deadlock can prevent
7 the ERP to finish. The ERP is trying to force the wka
8 port offline waiting for the scheduled work to finish.
9 The scheduled work is waiting for the refcount to
10 turn zero and another task is waiting for the ERP to
11 finish before descrementing the refcounter. ->deadlock
12Solution: Don't wait for the refcount to turn zero. If required
13 the wka port offline function is called again later.
14
15Acked-by: John Jolly <jjolly@suse.de>
16
17---
18 drivers/s390/scsi/zfcp_fc.c | 3 ---
19 1 file changed, 3 deletions(-)
20
21Index: linux-sles11/drivers/s390/scsi/zfcp_fc.c
22===================================================================
23--- linux-sles11.orig/drivers/s390/scsi/zfcp_fc.c
24+++ linux-sles11/drivers/s390/scsi/zfcp_fc.c
25@@ -75,9 +75,6 @@ static void zfcp_wka_port_offline(struct
26 struct zfcp_wka_port *wka_port =
27 container_of(dw, struct zfcp_wka_port, work);
28
29- wait_event(wka_port->completion_wq,
30- atomic_read(&wka_port->refcount) == 0);
31-
32 mutex_lock(&wka_port->mutex);
33 if ((atomic_read(&wka_port->refcount) != 0) ||
34 (wka_port->status != ZFCP_WKA_PORT_ONLINE))