Messages in this thread | | | Subject | Re: [PATCH v6 2/7] s390: ap: new vfio_ap_queue structure | From | Pierre Morel <> | Date | Thu, 28 Mar 2019 14:12:19 +0100 |
| |
On 25/03/2019 09:05, Harald Freudenberger wrote: > On 22.03.19 15:43, Pierre Morel wrote: >> The AP interruptions are assigned on a queue basis and >> the GISA structure is handled on a VM basis, so that
...snip...
>> + * vfio_ap_queue_dev_remove: >> + * >> + * Free the associated vfio_ap_queue structure >> + */ >> static void vfio_ap_queue_dev_remove(struct ap_device *apdev) >> { >> - /* Nothing to do yet */ >> + struct vfio_ap_queue *q; >> + >> + q = dev_get_drvdata(&apdev->device); > I'd add a check if q != NULL here.
I wonder if this can ever happen. However I added a check in the next patch. I can move it here.
>> + mutex_lock(&matrix_dev->lock); >> + list_del(&q->list); >> + mutex_unlock(&matrix_dev->lock); >> + kfree(q); > I would add a line: > dev_set_drvdata(&apdev->device, NULL);
OK, I clean it before giving it back, fair.
Thanks.
Rgeards, Pierre
-- Pierre Morel Linux/KVM/QEMU in Böblingen - Germany
| |