s390: vfio-ap: fix irq registration
authorChristian Borntraeger <borntraeger@de.ibm.com>
Fri, 5 Jul 2019 19:02:48 +0000 (21:02 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Thu, 11 Jul 2019 18:40:01 +0000 (20:40 +0200)
commit5c4c2126fb69812e6e62a7d8bfaac308a3ddeec7
tree525fb715f156c8974eb06c3f10b74421564ad7bd
parent820bace734722715c643dcb5f74b502cb912d4eb
s390: vfio-ap: fix irq registration

vfio_ap_free_aqic_resources is called in two places:
- during registration to have a "known state"
- during interrupt disable

We must not clear q->matrix_mdev in the registration phase as this will
mess up the reference counting and can lead to some warning and other
bugs.

Fixes: ec89b55e3bce ("s390: ap: implement PAPQ AQIC interception in kernel")
Reviewed-by: Halil Pasic <pasic@linux.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
drivers/s390/crypto/vfio_ap_ops.c