[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <491D6B4EAD0A714894D8AD22F4BDE04304FF5A@SCYBEXDAG04.amd.com>
Date: Mon, 19 Mar 2012 01:55:40 +0000
From: "Chen, Dennis (SRDC SW)" <Dennis1.Chen@....com>
To: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC: "beattiem@...ibm.com" <beattiem@...ibm.com>,
"holzheu@...ibm.com" <holzheu@...ibm.com>,
"munzert@...ibm.com" <munzert@...ibm.com>,
"linux390@...ibm.com" <linux390@...ibm.com>,
"linux-s390@...r.kernel.org" <linux-s390@...r.kernel.org>,
"schwidefsky@...ibm.com" <schwidefsky@...ibm.com>,
"heiko.carstens@...ibm.com" <heiko.carstens@...ibm.com>,
"Chen, Dennis (SRDC SW)" <Dennis1.Chen@....com>
Subject: RE: [PATCH]s390/char/vmur.c: memory leak Fix in the driver
CC'ing maintainer: Martin Schwidefsky & Heiko Carstens...
-----Original Message-----
From: Chen, Dennis (SRDC SW)
Sent: Sunday, March 18, 2012 3:41 AM
To: linux-kernel@...r.kernel.org
Cc: beattiem@...ibm.com; holzheu@...ibm.com; munzert@...ibm.com; linux390@...ibm.com; linux-s390@...r.kernel.org; Chen, Dennis (SRDC SW)
Subject: [PATCH]s390/char/vmur.c: memory leak Fix in the driver
This patch is used to fix a memory leak issue in s390/char/vmur.c: a character device instance is
allocated by cdev_alloc, the cdev_del will not free that space if cdev_init is applied before.
Signed-off-by: dennis1.chen@....com
--- a/s390/char/vmur.c 2012-03-18 02:50:47.950963949 +0800
+++ b/s390/char/vmur.c 2012-03-18 03:12:04.790936740 +0800
@@ -903,7 +903,7 @@ static int ur_set_online(struct ccw_devi
goto fail_urdev_put;
}
- cdev_init(urd->char_device, &ur_fops);
+ urd->char_device->ops = &ur_fops;
urd->char_device->dev = MKDEV(major, minor);
urd->char_device->owner = ur_fops.owner;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists