summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorThomas Weißschuh <linux@weissschuh.net>2024-08-05 12:39:36 +0300
committerJoel Granados <joel.granados@kernel.org>2024-10-09 14:39:11 +0300
commit57e3707eb5e3d9a45eef9151f0378313b1d39a17 (patch)
treed9b5bedcf605f773a1756f6e8cc5ebb192ddaa9a /include
parent8cf0b93919e13d1e8d4466eb4080a4c4d9d66d7b (diff)
downloadlinux-57e3707eb5e3d9a45eef9151f0378313b1d39a17.tar.xz
bpf: Constify ctl_table argument of filter function
The sysctl core is moving to allow "struct ctl_table" in read-only memory. As a preparation for that all functions handling "struct ctl_table" need to be able to work with "const struct ctl_table". As __cgroup_bpf_run_filter_sysctl() does not modify its table, it can be adapted trivially. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Signed-off-by: Joel Granados <joel.granados@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/bpf-cgroup.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/bpf-cgroup.h b/include/linux/bpf-cgroup.h
index ce91d9b2acb9..4dd17128b204 100644
--- a/include/linux/bpf-cgroup.h
+++ b/include/linux/bpf-cgroup.h
@@ -138,7 +138,7 @@ int __cgroup_bpf_check_dev_permission(short dev_type, u32 major, u32 minor,
short access, enum cgroup_bpf_attach_type atype);
int __cgroup_bpf_run_filter_sysctl(struct ctl_table_header *head,
- struct ctl_table *table, int write,
+ const struct ctl_table *table, int write,
char **buf, size_t *pcount, loff_t *ppos,
enum cgroup_bpf_attach_type atype);