Lines Matching full:proxy

42 static void free_proxy(struct aa_proxy *proxy)  in free_proxy()  argument
44 if (proxy) { in free_proxy()
46 aa_put_label(rcu_dereference_protected(proxy->label, true)); in free_proxy()
47 memset(proxy, 0, sizeof(*proxy)); in free_proxy()
48 RCU_INIT_POINTER(proxy->label, (struct aa_label *)PROXY_POISON); in free_proxy()
49 kfree(proxy); in free_proxy()
55 struct aa_proxy *proxy = container_of(kref, struct aa_proxy, count); in aa_proxy_kref() local
57 free_proxy(proxy); in aa_proxy_kref()
81 tmp = rcu_dereference_protected(orig->proxy->label, in __aa_proxy_redirect()
83 rcu_assign_pointer(orig->proxy->label, aa_get_label(new)); in __aa_proxy_redirect()
90 struct aa_proxy *proxy = new->proxy; in __proxy_share() local
92 new->proxy = aa_get_proxy(old->proxy); in __proxy_share()
94 aa_put_proxy(proxy); in __proxy_share()
334 if (label->proxy) { in aa_label_destroy()
335 if (rcu_dereference_protected(label->proxy->label, true) == label) in aa_label_destroy()
336 rcu_assign_pointer(label->proxy->label, NULL); in aa_label_destroy()
337 aa_put_proxy(label->proxy); in aa_label_destroy()
341 label->proxy = (struct aa_proxy *) PROXY_POISON + 1; in aa_label_destroy()
395 /* need to free directly to break circular ref with proxy */ in label_free_or_put_new()
420 * @proxy: proxy to use OR null if to allocate a new one
426 struct aa_label *aa_label_alloc(int size, struct aa_proxy *proxy, gfp_t gfp) in aa_label_alloc() argument
441 if (!proxy) { in aa_label_alloc()
442 proxy = aa_alloc_proxy(new, gfp); in aa_label_alloc()
443 if (!proxy) in aa_label_alloc()
446 aa_get_proxy(proxy); in aa_label_alloc()
447 /* just set new's proxy, don't redirect proxy here if it was passed in*/ in aa_label_alloc()
448 new->proxy = proxy; in aa_label_alloc()
662 * if @replace is true l has a preallocated proxy associated
689 * the proxy in __label_insert()
804 if (old->proxy != new->proxy) in aa_label_replace()
1023 * Requires: preallocated proxy
1057 AA_BUG(!new->vec[k]->label.proxy); in label_merge_insert()
1058 AA_BUG(!new->vec[k]->label.proxy->label); in label_merge_insert()
1059 if (next->label.proxy != new->vec[k]->label.proxy) in label_merge_insert()
2029 new = aa_label_alloc(label->size, label->proxy, GFP_KERNEL); in __label_update()
2043 AA_BUG(!new->vec[i]->label.proxy); in __label_update()
2044 AA_BUG(!new->vec[i]->label.proxy->label); in __label_update()
2045 if (new->vec[i]->label.proxy != label->vec[i]->label.proxy) in __label_update()