Skip to content
Commit 6525bfbd authored by Xu Kuohai's avatar Xu Kuohai Committed by Greg Kroah-Hartman
Browse files

bpf: Fix error usage of map_fd and fdget() in generic_map_update_batch()

commit fda7a387 upstream.

1. The ufd in generic_map_update_batch() should be read from batch.map_fd;
2. A call to fdget() should be followed by a symmetric call to fdput().

Fixes: aa2e93b8

 ("bpf: Add generic support for update and delete batch ops")
Signed-off-by: default avatarXu Kuohai <xukuohai@huawei.com>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20211019032934.1210517-1-xukuohai@huawei.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent adb17f82
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment