diff options
author | Jan Glauber <jang@linux.vnet.ibm.com> | 2008-08-21 13:46:33 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2008-08-21 13:46:39 -0400 |
commit | 53b41ba7ce4563c33a0449fbcbbd70665477d654 (patch) | |
tree | 78aa9a9bb1675aea597bc2b88a3d0ca1a18de129 /drivers/s390 | |
parent | 8853e505a15f31fe608cb50e038ba2f794eed923 (diff) |
[S390] qdio: prevent oopsing if qdio_establish fails
If qdio_establish fails we call qdio_shutdown to cleanup the
qdio subchannel. The tiq_list entry may not be valid at that
time, therefore we must ignore queues with an invalid list entry
in tiqdio_remove_input_queues.
Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/cio/qdio_thinint.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/s390/cio/qdio_thinint.c b/drivers/s390/cio/qdio_thinint.c index 9291a771d812..ea7f61400267 100644 --- a/drivers/s390/cio/qdio_thinint.c +++ b/drivers/s390/cio/qdio_thinint.c | |||
@@ -113,7 +113,11 @@ void tiqdio_remove_input_queues(struct qdio_irq *irq_ptr) | |||
113 | struct qdio_q *q; | 113 | struct qdio_q *q; |
114 | int i; | 114 | int i; |
115 | 115 | ||
116 | for_each_input_queue(irq_ptr, q, i) { | 116 | for (i = 0; i < irq_ptr->nr_input_qs; i++) { |
117 | q = irq_ptr->input_qs[i]; | ||
118 | /* if establish triggered an error */ | ||
119 | if (!q || !q->entry.prev || !q->entry.next) | ||
120 | continue; | ||
117 | list_del_rcu(&q->entry); | 121 | list_del_rcu(&q->entry); |
118 | synchronize_rcu(); | 122 | synchronize_rcu(); |
119 | } | 123 | } |