Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a5e9ca57 authored by Sebastian Ott's avatar Sebastian Ott Committed by Martin Schwidefsky
Browse files

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: default avatarSebastian Ott <sebott@linux.vnet.ibm.com>
Reviewed-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
Reviewed-by: default avatarCornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 616503d1
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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 */