bpf: Fix comment for helper bpf_current_task_under_cgroup()
authorHengqi Chen <hengqi.chen@gmail.com>
Thu, 10 Mar 2022 15:53:35 +0000 (23:53 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 Apr 2022 12:14:59 +0000 (14:14 +0200)
commit 58617014405ad5c9f94f464444f4972dabb71ca7 upstream.

Fix the descriptions of the return values of helper bpf_current_task_under_cgroup().

Fixes: c6b5fb8690fa ("bpf: add documentation for eBPF helpers (42-50)")
Signed-off-by: Hengqi Chen <hengqi.chen@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20220310155335.1278783-1-hengqi.chen@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/uapi/linux/bpf.h
tools/include/uapi/linux/bpf.h

index 8481fc7676c0b50447343d6a43a163249eb8b3f0..6334aede67fc23e2f3f48b2027dbc9daf4c9612e 100644 (file)
@@ -1207,8 +1207,8 @@ union bpf_attr {
  *     Return
  *             The return value depends on the result of the test, and can be:
  *
- *             * 0, if current task belongs to the cgroup2.
- *             * 1, if current task does not belong to the cgroup2.
+ *             * 1, if current task belongs to the cgroup2.
+ *             * 0, if current task does not belong to the cgroup2.
  *             * A negative error code, if an error occurred.
  *
  * int bpf_skb_change_tail(struct sk_buff *skb, u32 len, u64 flags)
index 9e060c6a01ac299bd02aa87ef891c4d18d66c4a8..0c30ab898e2a5bccb2424e2997ae1c232f179397 100644 (file)
@@ -1205,8 +1205,8 @@ union bpf_attr {
  *     Return
  *             The return value depends on the result of the test, and can be:
  *
- *             * 0, if current task belongs to the cgroup2.
- *             * 1, if current task does not belong to the cgroup2.
+ *             * 1, if current task belongs to the cgroup2.
+ *             * 0, if current task does not belong to the cgroup2.
  *             * A negative error code, if an error occurred.
  *
  * int bpf_skb_change_tail(struct sk_buff *skb, u32 len, u64 flags)