kprobes: bugfix: try_module_get even if calling_mod is NULL
[deliverable/linux.git] / kernel / kprobes.c
index 9f8a3f25259a9da4c8535bab07014b07da79a643..3afd354c46f1ebac4e6a86cf5912c763a03725d3 100644 (file)
@@ -634,7 +634,7 @@ static int __kprobes __register_kprobe(struct kprobe *p,
                 * avoid incrementing the module refcount, so as to allow
                 * unloading of self probing modules.
                 */
-               if (calling_mod && calling_mod != probed_mod) {
+               if (calling_mod != probed_mod) {
                        if (unlikely(!try_module_get(probed_mod))) {
                                preempt_enable();
                                return -EINVAL;
This page took 0.025791 seconds and 5 git commands to generate.