livepatch: Avoid CPU hogging with cond_resched
[sfrench/cifs-2.6.git] / kernel / module.c
index 40ec9a030eecf41d5597e6c910746aab385b1da0..c96160f7f3f54924d10ccad78e6fe12d01ddb8da 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: