dev_cgroup
list_for_each_entry(walk, &dev_cgroup->exceptions, list) {
list_add_tail_rcu(&excopy->list, &dev_cgroup->exceptions);
static void dev_exception_rm(struct dev_cgroup *dev_cgroup,
list_for_each_entry_safe(walk, tmp, &dev_cgroup->exceptions, list) {
static void __dev_exception_clean(struct dev_cgroup *dev_cgroup)
list_for_each_entry_safe(ex, tmp, &dev_cgroup->exceptions, list) {
static void dev_exception_clean(struct dev_cgroup *dev_cgroup)
__dev_exception_clean(dev_cgroup);
static inline bool is_devcg_online(const struct dev_cgroup *devcg)
struct dev_cgroup *dev_cgroup = css_to_devcgroup(css);
struct dev_cgroup *parent_dev_cgroup = css_to_devcgroup(css->parent);
dev_cgroup->behavior = DEVCG_DEFAULT_ALLOW;
ret = dev_exceptions_copy(&dev_cgroup->exceptions,
dev_cgroup->behavior = parent_dev_cgroup->behavior;
struct dev_cgroup *dev_cgroup = css_to_devcgroup(css);
dev_cgroup->behavior = DEVCG_DEFAULT_NONE;
struct dev_cgroup *dev_cgroup;
dev_cgroup = kzalloc_obj(*dev_cgroup);
if (!dev_cgroup)
INIT_LIST_HEAD(&dev_cgroup->exceptions);
dev_cgroup->behavior = DEVCG_DEFAULT_NONE;
return &dev_cgroup->css;
struct dev_cgroup *dev_cgroup = css_to_devcgroup(css);
__dev_exception_clean(dev_cgroup);
kfree(dev_cgroup);
struct dev_cgroup *devcgroup = css_to_devcgroup(seq_css(m));
static bool verify_new_ex(struct dev_cgroup *dev_cgroup,
if (dev_cgroup->behavior == DEVCG_DEFAULT_ALLOW) {
match = match_exception_partial(&dev_cgroup->exceptions,
match = match_exception(&dev_cgroup->exceptions, refex->type,
static int parent_has_perm(struct dev_cgroup *childcg,
struct dev_cgroup *parent = css_to_devcgroup(childcg->css.parent);
static bool parent_allows_removal(struct dev_cgroup *childcg,
struct dev_cgroup *parent = css_to_devcgroup(childcg->css.parent);
static inline struct dev_cgroup *css_to_devcgroup(struct cgroup_subsys_state *s)
static inline int may_allow_all(struct dev_cgroup *parent)
return s ? container_of(s, struct dev_cgroup, css) : NULL;
static void revalidate_active_exceptions(struct dev_cgroup *devcg)
static inline struct dev_cgroup *task_devcgroup(struct task_struct *task)
static int propagate_exception(struct dev_cgroup *devcg_root,
struct dev_cgroup *devcg = css_to_devcgroup(pos);
static int devcgroup_update_access(struct dev_cgroup *devcgroup,
struct dev_cgroup *parent = css_to_devcgroup(devcgroup->css.parent);
struct dev_cgroup tmp_devcgrp;
struct dev_cgroup *dev_cgroup;
dev_cgroup = task_devcgroup(current);
if (dev_cgroup->behavior == DEVCG_DEFAULT_ALLOW)
rc = !match_exception_partial(&dev_cgroup->exceptions,
rc = match_exception(&dev_cgroup->exceptions, type, major,
static int dev_exception_add(struct dev_cgroup *dev_cgroup,
struct dev_cgroup *skel;