@@ -1337,6 +1337,7 @@ int generic_map_delete_batch(struct bpf_
maybe_wait_bpf_programs(map);
if (err)
break;
+ cond_resched();
}
if (copy_to_user(&uattr->batch.count, &cp, sizeof(cp)))
err = -EFAULT;
@@ -1394,6 +1395,7 @@ int generic_map_update_batch(struct bpf_
if (err)
break;
+ cond_resched();
}
if (copy_to_user(&uattr->batch.count, &cp, sizeof(cp)))
@@ -1491,6 +1493,7 @@ int generic_map_lookup_batch(struct bpf_
swap(prev_key, key);
retry = MAP_LOOKUP_RETRIES;
cp++;
+ cond_resched();
}
if (err == -EFAULT)