[patch 15/38] cio: cm_enable memory leak.

Martin Schwidefsky
2007-04-27T14:15:51Z

[-- Attachment #1: 113-cio-leak.diff --]
[-- Type: text/plain, Size: 982 bytes --]

From: Cornelia Huck <cornelia.huck@de.ibm.com>

We allocage two pages when channel path measurements are enabled
via cm_enable. We must not forget to free them again when
channel path measurements are disabled again.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---

drivers/s390/cio/chsc.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)

Index: quilt-2.6/drivers/s390/cio/chsc.c
===================================================================
--- quilt-2.6.orig/drivers/s390/cio/chsc.c 2007-04-27 16:04:55.000000000 +0200
+++ quilt-2.6/drivers/s390/cio/chsc.c 2007-04-27 16:04:55.000000000 +0200
@@ -818,7 +818,7 @@
} else
chsc_remove_cmg_attr(css);
}
- if (enable && !css->cm_enabled) {
+ if (!css->cm_enabled) {
free_page((unsigned long)css->cub_addr1);
free_page((unsigned long)css->cub_addr2);