aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2006-02-16 16:50:23 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-03-20 16:42:58 -0500
commit03e88ae1b13dfdc8bbaa59b8198e1ca53aad12ac (patch)
tree322127d9875129d2e9b1c3cb744b4940bd7d8a47 /include
parentb87ba0a33a634c9a8e3609702122a04034a0688d (diff)
[PATCH] fix module sysfs files reference counting
The module files, refcnt, version, and srcversion did not properly increment the owner's module reference count, allowing the modules to be removed while the files were open, causing oopses. This patch fixes this, and also fixes the problem that the version and srcversion files were not showing up, unless CONFIG_MODULE_UNLOAD was enabled, which is not correct. Cc: Nathan Lynch <ntl@pobox.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include')
-rw-r--r--include/linux/module.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/module.h b/include/linux/module.h
index a25d5f61548c..70bd843c71cb 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -245,6 +245,7 @@ struct module
245 /* Sysfs stuff. */ 245 /* Sysfs stuff. */
246 struct module_kobject mkobj; 246 struct module_kobject mkobj;
247 struct module_param_attrs *param_attrs; 247 struct module_param_attrs *param_attrs;
248 struct module_attribute *modinfo_attrs;
248 const char *version; 249 const char *version;
249 const char *srcversion; 250 const char *srcversion;
250 251