summaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2015-09-07 19:52:31 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2015-10-14 14:32:03 +0200
commita5e9ca573b5fe47aef30e9c33c31b5fe7b0dfb88 (patch)
treeea355f229d40e63b421a438a32fc69a6667a0b44 /drivers/s390/cio
parent616503d1d8940049841e5b6f2ab5157f37072ed9 (diff)
downloadop-kernel-dev-a5e9ca573b5fe47aef30e9c33c31b5fe7b0dfb88.zip
op-kernel-dev-a5e9ca573b5fe47aef30e9c33c31b5fe7b0dfb88.tar.gz
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 <sebott@linux.vnet.ibm.com> Reviewed-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio')
-rw-r--r--drivers/s390/cio/cmf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/s390/cio/cmf.c b/drivers/s390/cio/cmf.c
index 59b1ac2..0d1898e 100644
--- a/drivers/s390/cio/cmf.c
+++ b/drivers/s390/cio/cmf.c
@@ -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 */
OpenPOWER on IntegriCloud