linux/net/core/netclassid_cgroup.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * net/core/netclassid_cgroup.c	Classid Cgroupfs Handling
 *
 * Authors:	Thomas Graf <[email protected]>
 */

#include <linux/slab.h>
#include <linux/cgroup.h>
#include <linux/fdtable.h>
#include <linux/sched/task.h>

#include <net/cls_cgroup.h>
#include <net/sock.h>

static inline struct cgroup_cls_state *css_cls_state(struct cgroup_subsys_state *css)
{}

struct cgroup_cls_state *task_cls_state(struct task_struct *p)
{}
EXPORT_SYMBOL_GPL();

static struct cgroup_subsys_state *
cgrp_css_alloc(struct cgroup_subsys_state *parent_css)
{}

static int cgrp_css_online(struct cgroup_subsys_state *css)
{}

static void cgrp_css_free(struct cgroup_subsys_state *css)
{}

/*
 * To avoid freezing of sockets creation for tasks with big number of threads
 * and opened sockets lets release file_lock every 1000 iterated descriptors.
 * New sockets will already have been created with new classid.
 */

struct update_classid_context {};

#define UPDATE_CLASSID_BATCH

static int update_classid_sock(const void *v, struct file *file, unsigned int n)
{}

static void update_classid_task(struct task_struct *p, u32 classid)
{}

static void cgrp_attach(struct cgroup_taskset *tset)
{}

static u64 read_classid(struct cgroup_subsys_state *css, struct cftype *cft)
{}

static int write_classid(struct cgroup_subsys_state *css, struct cftype *cft,
			 u64 value)
{}

static struct cftype ss_files[] =;

struct cgroup_subsys net_cls_cgrp_subsys =;