Just like commit
9087c6ff8dfe ("bpf: Call maybe_wait_bpf_programs() only
once from generic_map_delete_batch()"), there is also no need to call
maybe_wait_bpf_programs() for each update in batched update, so only
call it once in generic_map_update_batch().
Signed-off-by: Hou Tao <houtao1@huawei.com>
Link: https://lore.kernel.org/r/20231208102355.2628918-3-houtao@huaweicloud.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
rcu_read_unlock();
}
bpf_enable_instrumentation();
- maybe_wait_bpf_programs(map);
return err;
}
}
err = bpf_map_update_value(map, f.file, key, value, attr->flags);
+ maybe_wait_bpf_programs(map);
kvfree(value);
free_key:
kvfree(value);
kvfree(key);
+
+ maybe_wait_bpf_programs(map);
return err;
}