mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-24 07:31:41 +00:00
[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>
This commit is contained in:
parent
b87ba0a33a
commit
03e88ae1b1
3 changed files with 32 additions and 56 deletions
|
@ -245,6 +245,7 @@ struct module
|
|||
/* Sysfs stuff. */
|
||||
struct module_kobject mkobj;
|
||||
struct module_param_attrs *param_attrs;
|
||||
struct module_attribute *modinfo_attrs;
|
||||
const char *version;
|
||||
const char *srcversion;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue