Commit 459ea72c authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-5.15-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup

Pull cgroup fixes from Tejun Heo:
 "All documentation / comment updates"

* 'for-5.15-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
  cgroupv2, docs: fix misinformation in "device controller" section
  cgroup/cpuset: Change references of cpuset_mutex to cpuset_rwsem
  docs/cgroup: remove some duplicate words
parents 0a5d6c64 c0002d11
...@@ -1226,7 +1226,7 @@ PAGE_SIZE multiple when read back. ...@@ -1226,7 +1226,7 @@ PAGE_SIZE multiple when read back.
Note that all fields in this file are hierarchical and the Note that all fields in this file are hierarchical and the
file modified event can be generated due to an event down the file modified event can be generated due to an event down the
hierarchy. For for the local events at the cgroup level see hierarchy. For the local events at the cgroup level see
memory.events.local. memory.events.local.
low low
...@@ -2170,19 +2170,19 @@ existing device files. ...@@ -2170,19 +2170,19 @@ existing device files.
Cgroup v2 device controller has no interface files and is implemented Cgroup v2 device controller has no interface files and is implemented
on top of cgroup BPF. To control access to device files, a user may on top of cgroup BPF. To control access to device files, a user may
create bpf programs of the BPF_CGROUP_DEVICE type and attach them create bpf programs of type BPF_PROG_TYPE_CGROUP_DEVICE and attach
to cgroups. On an attempt to access a device file, corresponding them to cgroups with BPF_CGROUP_DEVICE flag. On an attempt to access a
BPF programs will be executed, and depending on the return value device file, corresponding BPF programs will be executed, and depending
the attempt will succeed or fail with -EPERM. on the return value the attempt will succeed or fail with -EPERM.
A BPF_CGROUP_DEVICE program takes a pointer to the bpf_cgroup_dev_ctx A BPF_PROG_TYPE_CGROUP_DEVICE program takes a pointer to the
structure, which describes the device access attempt: access type bpf_cgroup_dev_ctx structure, which describes the device access attempt:
(mknod/read/write) and device (type, major and minor numbers). access type (mknod/read/write) and device (type, major and minor numbers).
If the program returns 0, the attempt fails with -EPERM, otherwise If the program returns 0, the attempt fails with -EPERM, otherwise it
it succeeds. succeeds.
An example of BPF_CGROUP_DEVICE program may be found in the kernel An example of BPF_PROG_TYPE_CGROUP_DEVICE program may be found in
source tree in the tools/testing/selftests/bpf/progs/dev_cgroup.c file. tools/testing/selftests/bpf/progs/dev_cgroup.c in the kernel source tree.
RDMA RDMA
......
This diff is collapsed.
Markdown is supported
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