• Home
  • Raw
  • Download

Lines Matching full:ex

63 	struct dev_exception_item *ex, *tmp, *new;  in dev_exceptions_copy()  local
67 list_for_each_entry(ex, orig, list) { in dev_exceptions_copy()
68 new = kmemdup(ex, sizeof(*ex), GFP_KERNEL); in dev_exceptions_copy()
77 list_for_each_entry_safe(ex, tmp, dest, list) { in dev_exceptions_copy()
78 list_del(&ex->list); in dev_exceptions_copy()
79 kfree(ex); in dev_exceptions_copy()
86 struct dev_exception_item *ex, *tmp; in dev_exceptions_move() local
90 list_for_each_entry_safe(ex, tmp, orig, list) { in dev_exceptions_move()
91 list_move_tail(&ex->list, dest); in dev_exceptions_move()
99 struct dev_exception_item *ex) in dev_exception_add() argument
105 excopy = kmemdup(ex, sizeof(*ex), GFP_KERNEL); in dev_exception_add()
110 if (walk->type != ex->type) in dev_exception_add()
112 if (walk->major != ex->major) in dev_exception_add()
114 if (walk->minor != ex->minor) in dev_exception_add()
117 walk->access |= ex->access; in dev_exception_add()
131 struct dev_exception_item *ex) in dev_exception_rm() argument
138 if (walk->type != ex->type) in dev_exception_rm()
140 if (walk->major != ex->major) in dev_exception_rm()
142 if (walk->minor != ex->minor) in dev_exception_rm()
145 walk->access &= ~ex->access; in dev_exception_rm()
155 struct dev_exception_item *ex, *tmp; in __dev_exception_clean() local
157 list_for_each_entry_safe(ex, tmp, &dev_cgroup->exceptions, list) { in __dev_exception_clean()
158 list_del_rcu(&ex->list); in __dev_exception_clean()
159 kfree_rcu(ex, rcu); in __dev_exception_clean()
283 struct dev_exception_item *ex; in devcgroup_seq_show() local
300 list_for_each_entry_rcu(ex, &devcgroup->exceptions, list) { in devcgroup_seq_show()
301 set_access(acc, ex->access); in devcgroup_seq_show()
302 set_majmin(maj, ex->major); in devcgroup_seq_show()
303 set_majmin(min, ex->minor); in devcgroup_seq_show()
304 seq_printf(m, "%c %s:%s %s\n", type_to_char(ex->type), in devcgroup_seq_show()
329 struct dev_exception_item *ex; in match_exception() local
331 list_for_each_entry_rcu(ex, exceptions, list) { in match_exception()
332 if ((type & DEVCG_DEV_BLOCK) && !(ex->type & DEVCG_DEV_BLOCK)) in match_exception()
334 if ((type & DEVCG_DEV_CHAR) && !(ex->type & DEVCG_DEV_CHAR)) in match_exception()
336 if (ex->major != ~0 && ex->major != major) in match_exception()
338 if (ex->minor != ~0 && ex->minor != minor) in match_exception()
341 if (access & (~ex->access)) in match_exception()
366 struct dev_exception_item *ex; in match_exception_partial() local
368 list_for_each_entry_rcu(ex, exceptions, list, in match_exception_partial()
370 if ((type & DEVCG_DEV_BLOCK) && !(ex->type & DEVCG_DEV_BLOCK)) in match_exception_partial()
372 if ((type & DEVCG_DEV_CHAR) && !(ex->type & DEVCG_DEV_CHAR)) in match_exception_partial()
378 if (ex->major != ~0 && major != ~0 && ex->major != major) in match_exception_partial()
380 if (ex->minor != ~0 && minor != ~0 && ex->minor != minor) in match_exception_partial()
387 if (!(access & ex->access)) in match_exception_partial()
462 struct dev_exception_item *ex) in parent_has_perm() argument
468 return verify_new_ex(parent, ex, childcg->behavior); in parent_has_perm()
474 * @ex: exception being removed
483 struct dev_exception_item *ex) in parent_allows_removal() argument
498 return !match_exception_partial(&parent->exceptions, ex->type, in parent_allows_removal()
499 ex->major, ex->minor, ex->access); in parent_allows_removal()
530 struct dev_exception_item *ex; in revalidate_active_exceptions() local
534 ex = container_of(this, struct dev_exception_item, list); in revalidate_active_exceptions()
535 if (!parent_has_perm(devcg, ex)) in revalidate_active_exceptions()
536 dev_exception_rm(devcg, ex); in revalidate_active_exceptions()
543 * @ex: new exception to be propagated
548 struct dev_exception_item *ex) in propagate_exception() argument
575 rc = dev_exception_add(devcg, ex); in propagate_exception()
585 dev_exception_rm(devcg, ex); in propagate_exception()
615 struct dev_exception_item ex; in devcgroup_update_access() local
622 memset(&ex, 0, sizeof(ex)); in devcgroup_update_access()
669 ex.type = DEVCG_DEV_BLOCK; in devcgroup_update_access()
672 ex.type = DEVCG_DEV_CHAR; in devcgroup_update_access()
682 ex.major = ~0; in devcgroup_update_access()
692 rc = kstrtou32(temp, 10, &ex.major); in devcgroup_update_access()
704 ex.minor = ~0; in devcgroup_update_access()
714 rc = kstrtou32(temp, 10, &ex.minor); in devcgroup_update_access()
725 ex.access |= DEVCG_ACC_READ; in devcgroup_update_access()
728 ex.access |= DEVCG_ACC_WRITE; in devcgroup_update_access()
731 ex.access |= DEVCG_ACC_MKNOD; in devcgroup_update_access()
751 if (!parent_allows_removal(devcgroup, &ex)) in devcgroup_update_access()
753 dev_exception_rm(devcgroup, &ex); in devcgroup_update_access()
757 if (!parent_has_perm(devcgroup, &ex)) in devcgroup_update_access()
759 rc = dev_exception_add(devcgroup, &ex); in devcgroup_update_access()
768 dev_exception_rm(devcgroup, &ex); in devcgroup_update_access()
770 rc = dev_exception_add(devcgroup, &ex); in devcgroup_update_access()
775 rc = propagate_exception(devcgroup, &ex); in devcgroup_update_access()