diff options
author | Julian Wiedmann <jwi@linux.vnet.ibm.com> | 2018-03-21 19:17:14 +0300 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2018-04-10 08:38:58 +0300 |
commit | 7eee12b44eb4c0c30b0eac5946fb59f1460572f6 (patch) | |
tree | f9d33dcc31270e5f9b89d58111375db5ee0aa4d2 /drivers/s390 | |
parent | 89286320a236d245834075fa13adb0bdd827ecaa (diff) | |
download | linux-7eee12b44eb4c0c30b0eac5946fb59f1460572f6.tar.xz |
s390/qdio: lock device while installing IRQ handler
During setup, qdio takes control of the presented ccw device and replaces
the device's IRQ handler with its own. To avoid any interference with
conccurent activity on the device, this should be done while holding the
device's lock.
Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com>
Reviewed-by: Benjamin Block <bblock@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_setup.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/s390/cio/qdio_setup.c b/drivers/s390/cio/qdio_setup.c index 98f3cfdc0d02..439991d71b14 100644 --- a/drivers/s390/cio/qdio_setup.c +++ b/drivers/s390/cio/qdio_setup.c @@ -507,8 +507,10 @@ int qdio_setup_irq(struct qdio_initialize *init_data) irq_ptr->aqueue = *ciw; /* set new interrupt handler */ + spin_lock_irq(get_ccwdev_lock(irq_ptr->cdev)); irq_ptr->orig_handler = init_data->cdev->handler; init_data->cdev->handler = qdio_int_handler; + spin_unlock_irq(get_ccwdev_lock(irq_ptr->cdev)); return 0; out_err: qdio_release_memory(irq_ptr); |