Thread (1 message) 1 message, 1 author, 2016-11-28

Re: [PATCH] bpf: cgroup: fix documentation of __cgroup_bpf_update()

From: Daniel Mack <hidden>
Date: 2016-11-28 13:07:56
Also in: cgroups

Possibly related (same subject, not in this thread)

On 11/28/2016 02:03 PM, Daniel Borkmann wrote:
On 11/28/2016 12:04 PM, Daniel Mack wrote:
quoted
There's a 'not' missing in one paragraph. Add it.

Signed-off-by: Daniel Mack <redacted>
Reported-by: Rami Rosen <redacted>
Fixes: 3007098494be ("cgroup: add support for eBPF programs")
Small nit in subject: s/[PATCH]/[PATCH net-next]/
quoted
  kernel/bpf/cgroup.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/bpf/cgroup.c b/kernel/bpf/cgroup.c
index a0ab43f..b708e6e 100644
--- a/kernel/bpf/cgroup.c
+++ b/kernel/bpf/cgroup.c
@@ -70,9 +70,9 @@ void cgroup_bpf_inherit(struct cgroup *cgrp, struct cgroup *parent)
   * releases the one that is currently attached, if any. @prog is then made
   * the effective program of type @type in that cgroup.
   *
- * If @prog is %NULL, the currently attached program of type @type is released,
- * and the effective program of the parent cgroup (if any) is inherited to
- * @cgrp.
+ * If @prog is not %NULL, the currently attached program of type @type is
+ * released, and the effective program of the parent cgroup (if any) is
+ * inherited to @cgrp.
Both paragraphs for __cgroup_bpf_update() currently say:

[...]
  * If @prog is %NULL, this function attaches a new program to the cgroup and
  * releases the one that is currently attached, if any. @prog is then made
  * the effective program of type @type in that cgroup.
  *
  * If @prog is %NULL, the currently attached program of type @type is released,
  * and the effective program of the parent cgroup (if any) is inherited to
  * @cgrp.
[...]

It looks to me that you are 'fixing' the wrong location. First paragraph is
actually missing a "not", which would then also align with what the code does.
Argh, sorry. Will resend.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help