virtio_ccw: fix vcdev pointer handling issues
authorHeinz Graalfs <graalfs@linux.vnet.ibm.com>
Thu, 27 Feb 2014 13:34:35 +0000 (14:34 +0100)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Tue, 4 Mar 2014 09:41:03 +0000 (10:41 +0100)
commit2e0210432d34bc7f01644905c2bb2d5d9be5b6ac
treeecc95786e82a53aeff50efb50913aeb4bb9b9f32
parent1ee0bc559dc34fe36a29494faf7b7c91533bd31c
virtio_ccw: fix vcdev pointer handling issues

The interrupt handler virtio_ccw_int_handler() using the vcdev pointer
is protected by the ccw_device lock. Resetting the pointer within the
ccw_device structure should be done when holding this lock.

Also resetting the vcdev pointer (under the ccw_device lock) prior to
freeing the vcdev pointer memory removes a critical path.

Signed-off-by: Heinz Graalfs <graalfs@linux.vnet.ibm.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
drivers/s390/kvm/virtio_ccw.c