livepatch: Avoid CPU hogging with cond_resched
[linux-2.6-microblaze.git] / kernel / module.c
index 40ec9a0..c96160f 100644 (file)
@@ -4462,6 +4462,8 @@ int module_kallsyms_on_each_symbol(int (*fn)(void *, const char *,
                                 mod, kallsyms_symbol_value(sym));
                        if (ret != 0)
                                goto out;
+
+                       cond_resched();
                }
        }
 out: