Skip to contentSkip to conversation

bpf: cgroup: fix documentation of __cgroup_bpf_update()

PATCH Superseded Daniel Mack 3 participants 3 messages Nov 28, 2016 1 message not in the archive

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bpf: cgroup: fix documentation of __cgroup_bpf_update()

There's a 'not' missing in one paragraph. Add it.

Fixes 3007098494be ("cgroup: add support for eBPF programs")
---
 kernel/bpf/cgroup.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
kernel/bpf/cgroup.c +3 -3
index a0ab43f..b708e6e 100644
@@ -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.
  *
  * Then, the descendants of @cgrp are walked and the effective program for
  * each of them is set to the effective program of @cgrp unless the
Signature · 1 line
2.7.4
maintainer
#1 lore raw
Quoted 5 lines · Daniel Mack

There's a 'not' missing in one paragraph. Add it.

Fixes 3007098494be ("cgroup: add support for eBPF programs")

Small nit in subject: s/[PATCH]/[PATCH net-next]/

Quoted 8 lines
  kernel/bpf/cgroup.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
kernel/bpf/cgroup.c +0 -0
index a0ab43f..b708e6e 100644

kernel/bpf/cgroup.c void cgroup_bpf_inherit(struct cgroup *cgrp, struct cgroup *parent) · line 75

Quoted 9 lines
kernel/bpf/cgroup.c +3 -3
@@ -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.

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw
Quoted 39 lines · Daniel Borkmann
Quoted 5 lines · Daniel Mack

There's a 'not' missing in one paragraph. Add it.

Fixes 3007098494be ("cgroup: add support for eBPF programs")

Small nit in subject: s/[PATCH]/[PATCH net-next]/

Quoted 8 lines
  kernel/bpf/cgroup.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
kernel/bpf/cgroup.c +0 -0
index a0ab43f..b708e6e 100644

kernel/bpf/cgroup.c void cgroup_bpf_inherit(struct cgroup *cgrp, struct cgroup *parent) · line 75

Quoted 9 lines
kernel/bpf/cgroup.c +3 -3
@@ -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.
[...]

Quoted 3 lines

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.