Skip to content

Commit

Permalink
s390/qdio: lock device while installing IRQ handler
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Benjamin Block <[email protected]>
Signed-off-by: Martin Schwidefsky <[email protected]>
  • Loading branch information
julianwiedmann authored and Martin Schwidefsky committed Apr 10, 2018
1 parent 8928632 commit 7eee12b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/s390/cio/qdio_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 7eee12b

Please sign in to comment.