s390/cio: fix memleak in channel measurement

The measurement block for the extended measurement data is not freed when
switching off per device measurement. Free the measurement block after HW
stopped accessing it.

Signed-off-by: Sebastian Ott <[email protected]>
Reviewed-by: Martin Schwidefsky <[email protected]>
Reviewed-by: Cornelia Huck <[email protected]>
Signed-off-by: Martin Schwidefsky <[email protected]>
This commit is contained in:
Sebastian Ott 2015-09-07 19:52:31 +02:00 • committed by Martin Schwidefsky
commit a5e9ca573b

View file

@ -876,8 +876,10 @@ static void free_cmbe(struct ccw_device *cdev)
spin_lock_irq(cdev->ccwlock);
cmb_data = cdev->private->cmb;
cdev->private->cmb = NULL;
if (cmb_data)
if (cmb_data) {
kfree(cmb_data->last_block);
kfree(cmb_data->hw_block);
}
kfree(cmb_data);
/* deactivate global measurement if this is the last channel */