[GIT PATCH] driver core fix for 2.6.24-rc6

Previous thread: [GIT PATCH] USB fixes for 2.6.24-rc5 by Greg KH on Sunday, December 23, 2007 - 3:24 am. (3 messages)

Next thread: 2.6.24-rc6-mm1 by Andrew Morton on Sunday, December 23, 2007 - 3:30 am. (135 messages)
To: Linus Torvalds <torvalds@...>, Andrew Morton <akpm@...>
Cc: <linux-kernel@...>
Date: Sunday, December 23, 2007 - 3:24 am

Here is one bugfix for a memory leak for every module that is unloaded
from the system due to the change in the kobject name code against your
2.6.24-rc6 tree.

And an entry for MAINTAINERS for the UIO subsystem so the proper people
get the blame :)

Please pull from:
master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6.git/

Patches will be sent as a follow-on to this message to lkml for people
to see.

thanks,

greg k-h

------------

MAINTAINERS | 8 ++++++++
kernel/params.c | 10 ++++++++++
2 files changed, 18 insertions(+), 0 deletions(-)

---------------

Greg Kroah-Hartman (1):
Modules: fix memory leak of module names

Hans-Jürgen Koch (1):
UIO: Add a MAINTAINERS entry for Userspace I/O

--

To: <linux-kernel@...>
Cc: Greg Kroah-Hartman <gregkh@...>, Alexey Dobriyan <adobriyan@...>, Kay Sievers <kay.sievers@...>
Date: Sunday, December 23, 2007 - 3:27 am

Due to the change in kobject name handling, the module kobject needs to
have a null release function to ensure that the name it previously set
will be properly cleaned up.

All of this wierdness goes away in 2.6.25 with the rework of the kobject
name and cleanup logic, but this is required for 2.6.24.

Thanks to Alexey Dobriyan for finding the problem, and to Kay Sievers
for pointing out the simple way to fix it after I tried many complex
ways.

Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
kernel/params.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/kernel/params.c b/kernel/params.c
index 2a4c514..7686417 100644
--- a/kernel/params.c
+++ b/kernel/params.c
@@ -697,8 +697,18 @@ static struct kset_uevent_ops module_uevent_ops = {
decl_subsys(module, &module_ktype, &module_uevent_ops);
int module_sysfs_initialized;

+static void module_release(struct kobject *kobj)
+{
+ /*
+ * Stupid empty release function to allow the memory for the kobject to
+ * be properly cleaned up. This will not need to be present for 2.6.25
+ * with the upcoming kobject core rework.
+ */
+}
+
static struct kobj_type module_ktype = {
.sysfs_ops = &module_sysfs_ops,
+ .release = module_release,
};

/*
--
1.5.3.7

--

To: <linux-kernel@...>
Cc: Hans-Jürgen Koch <hjk@...>, Greg Kroah-Hartman <gregkh@...>
Date: Sunday, December 23, 2007 - 3:27 am

From: Hans-Jürgen Koch <hjk@linutronix.de>

This patch adds an entry for the Userspace I/O framework to MAINTAINERS.

Signed-off-by: Hans J. Koch <hjk@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
MAINTAINERS | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 3c7db62..a06ee43 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4054,6 +4054,14 @@ L: user-mode-linux-user@lists.sourceforge.net
W: http://user-mode-linux.sourceforge.net
S: Maintained

+USERSPACE I/O (UIO)
+P: Hans J. Koch
+M: hjk@linutronix.de
+P: Greg Kroah-Hartman
+M: gregkh@suse.de
+L: linux-kernel@vger.kernel.org
+S: Maintained
+
FAT/VFAT/MSDOS FILESYSTEM:
P: OGAWA Hirofumi
M: hirofumi@mail.parknet.co.jp
--
1.5.3.7

--

Previous thread: [GIT PATCH] USB fixes for 2.6.24-rc5 by Greg KH on Sunday, December 23, 2007 - 3:24 am. (3 messages)

Next thread: 2.6.24-rc6-mm1 by Andrew Morton on Sunday, December 23, 2007 - 3:30 am. (135 messages)