[S390] qdio: prevent dsci access without adapter interrupts
A kernel panic may occur during sending or receiving network packets
on a machine without adapter interrupts since commit d36deae
.
The bug is triggered by writing to the shared indicator address which
is set to 0 if the machine doesn't have adapter interrupts.
Make the reading and setting of the shared indicator dependent on the
adapter interrupt feature and while at it move the code to the
file containing the adapter interrupt related code.
Thanks to Jan Jaeger for tracking this down.
Reported-by: Jan Jaeger <jan.jaeger@westnet.com.au>
Tested-by: Jan Jaeger <jan.jaeger@westnet.com.au>
Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:

committed by
Martin Schwidefsky

parent
2a3a2d66aa
commit
5f4026f8b2
@@ -1719,9 +1719,7 @@ int qdio_start_irq(struct ccw_device *cdev, int nr)
|
||||
|
||||
WARN_ON(queue_irqs_enabled(q));
|
||||
|
||||
if (!shared_ind(q))
|
||||
xchg(q->irq_ptr->dsci, 0);
|
||||
|
||||
clear_nonshared_ind(irq_ptr);
|
||||
qdio_stop_polling(q);
|
||||
clear_bit(QDIO_QUEUE_IRQS_DISABLED, &q->u.in.queue_irq_state);
|
||||
|
||||
@@ -1729,7 +1727,7 @@ int qdio_start_irq(struct ccw_device *cdev, int nr)
|
||||
* We need to check again to not lose initiative after
|
||||
* resetting the ACK state.
|
||||
*/
|
||||
if (!shared_ind(q) && *q->irq_ptr->dsci)
|
||||
if (test_nonshared_ind(irq_ptr))
|
||||
goto rescan;
|
||||
if (!qdio_inbound_q_done(q))
|
||||
goto rescan;
|
||||
|
Reference in New Issue
Block a user