]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - include/linux/module.h
module: fix kdb's illicit use of struct module_use.
[net-next-2.6.git] / include / linux / module.h
index 515d53ae6a795e9b73bbf0388aa8966be1014924..5d8fca5dcff5524e9485c582d391c4ab2fc20460 100644 (file)
@@ -181,6 +181,13 @@ void *__symbol_get(const char *symbol);
 void *__symbol_get_gpl(const char *symbol);
 #define symbol_get(x) ((typeof(&x))(__symbol_get(MODULE_SYMBOL_PREFIX #x)))
 
+/* modules using other modules: kdb wants to see this. */
+struct module_use {
+       struct list_head source_list;
+       struct list_head target_list;
+       struct module *source, *target;
+};
+
 #ifndef __GENKSYMS__
 #ifdef CONFIG_MODVERSIONS
 /* Mark the CRC weak since genksyms apparently decides not to
@@ -359,7 +366,9 @@ struct module
 
 #ifdef CONFIG_MODULE_UNLOAD
        /* What modules depend on me? */
-       struct list_head modules_which_use_me;
+       struct list_head source_list;
+       /* What modules do I depend on? */
+       struct list_head target_list;
 
        /* Who is waiting for us to be unloaded */
        struct task_struct *waiter;
@@ -465,8 +474,7 @@ static inline void __module_get(struct module *module)
        if (module) {
                preempt_disable();
                __this_cpu_inc(module->refptr->incs);
-               trace_module_get(module, _THIS_IP_,
-                                __this_cpu_read(module->refptr->incs));
+               trace_module_get(module, _THIS_IP_);
                preempt_enable();
        }
 }
@@ -480,8 +488,7 @@ static inline int try_module_get(struct module *module)
 
                if (likely(module_is_live(module))) {
                        __this_cpu_inc(module->refptr->incs);
-                       trace_module_get(module, _THIS_IP_,
-                               __this_cpu_read(module->refptr->incs));
+                       trace_module_get(module, _THIS_IP_);
                } else
                        ret = 0;