struct klp_patch *old_patch;
struct klp_object *old_obj;
- list_for_each_entry(old_patch, &klp_patches, list) {
+ klp_for_each_patch(old_patch) {
klp_for_each_object(old_patch, old_obj) {
int err;
{
struct klp_patch *old_patch, *tmp_patch;
- list_for_each_entry_safe(old_patch, tmp_patch, &klp_patches, list) {
+ klp_for_each_patch_safe(old_patch, tmp_patch) {
if (old_patch == new_patch)
return;
struct klp_patch *patch;
struct klp_object *obj;
- list_for_each_entry(patch, &klp_patches, list) {
+ klp_for_each_patch(patch) {
if (patch == limit)
break;
*/
mod->klp_alive = true;
- list_for_each_entry(patch, &klp_patches, list) {
+ klp_for_each_patch(patch) {
klp_for_each_object(patch, obj) {
if (!klp_is_module(obj) || strcmp(obj->name, mod->name))
continue;
extern struct mutex klp_mutex;
extern struct list_head klp_patches;
+#define klp_for_each_patch_safe(patch, tmp_patch) \
+ list_for_each_entry_safe(patch, tmp_patch, &klp_patches, list)
+
+#define klp_for_each_patch(patch) \
+ list_for_each_entry(patch, &klp_patches, list)
+
void klp_free_patch_start(struct klp_patch *patch);
void klp_discard_replaced_patches(struct klp_patch *new_patch);
void klp_discard_nops(struct klp_patch *new_patch);
for_each_possible_cpu(cpu)
klp_update_patch_state(idle_task(cpu));
- list_for_each_entry(patch, &klp_patches, list)
+ klp_for_each_patch(patch)
patch->forced = true;
}