lkml.org 
[lkml]   [2012]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRE: [PATCH]s390/char/vmur.c: memory leak Fix in the driver
Date
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@vger.kernel.org
Cc: beattiem@uk.ibm.com; holzheu@de.ibm.com; munzert@de.ibm.com; linux390@de.ibm.com; linux-s390@vger.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@amd.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;


\
 
 \ /
  Last update: 2012-03-19 02:59    [W:0.064 / U:1.648 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site