]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
bpf: Fix a comment describing bpf_attr
authorAnton Protopopov <a.s.protopopov@gmail.com>
Mon, 31 Mar 2025 20:36:17 +0000 (20:36 +0000)
committerAndrii Nakryiko <andrii@kernel.org>
Fri, 4 Apr 2025 15:53:24 +0000 (08:53 -0700)
The map_fd field of the bpf_attr union is used in the BPF_MAP_FREEZE
syscall.  Explicitly mention this in the comments.

Signed-off-by: Anton Protopopov <a.s.protopopov@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20250331203618.1973691-2-a.s.protopopov@gmail.com
include/uapi/linux/bpf.h
tools/include/uapi/linux/bpf.h

index 28705ae677849f841937040d4c976196e7fb3c87..07ee73cdf97b90051bc8628e1cc0ddbc346da01f 100644 (file)
@@ -1506,7 +1506,7 @@ union bpf_attr {
                __s32   map_token_fd;
        };
 
-       struct { /* anonymous struct used by BPF_MAP_*_ELEM commands */
+       struct { /* anonymous struct used by BPF_MAP_*_ELEM and BPF_MAP_FREEZE commands */
                __u32           map_fd;
                __aligned_u64   key;
                union {
index 28705ae677849f841937040d4c976196e7fb3c87..07ee73cdf97b90051bc8628e1cc0ddbc346da01f 100644 (file)
@@ -1506,7 +1506,7 @@ union bpf_attr {
                __s32   map_token_fd;
        };
 
-       struct { /* anonymous struct used by BPF_MAP_*_ELEM commands */
+       struct { /* anonymous struct used by BPF_MAP_*_ELEM and BPF_MAP_FREEZE commands */
                __u32           map_fd;
                __aligned_u64   key;
                union {