提交 a5e9ca57 编写于 作者: S Sebastian Ott 提交者: Martin Schwidefsky

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: NSebastian Ott <sebott@linux.vnet.ibm.com>
Reviewed-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
Reviewed-by: NCornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
上级 616503d1
...@@ -876,8 +876,10 @@ static void free_cmbe(struct ccw_device *cdev) ...@@ -876,8 +876,10 @@ static void free_cmbe(struct ccw_device *cdev)
spin_lock_irq(cdev->ccwlock); spin_lock_irq(cdev->ccwlock);
cmb_data = cdev->private->cmb; cmb_data = cdev->private->cmb;
cdev->private->cmb = NULL; cdev->private->cmb = NULL;
if (cmb_data) if (cmb_data) {
kfree(cmb_data->last_block); kfree(cmb_data->last_block);
kfree(cmb_data->hw_block);
}
kfree(cmb_data); kfree(cmb_data);
/* deactivate global measurement if this is the last channel */ /* deactivate global measurement if this is the last channel */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册