Lines Matching refs:rh

38 	struct rethook *rh = container_of(head, struct rethook, rcu);  in rethook_free_rcu()  local
43 node = rh->pool.head; in rethook_free_rcu()
52 if (refcount_sub_and_test(count, &rh->ref)) in rethook_free_rcu()
53 kfree(rh); in rethook_free_rcu()
66 void rethook_free(struct rethook *rh) in rethook_free() argument
68 WRITE_ONCE(rh->handler, NULL); in rethook_free()
70 call_rcu(&rh->rcu, rethook_free_rcu); in rethook_free()
84 struct rethook *rh = kzalloc(sizeof(struct rethook), GFP_KERNEL); in rethook_alloc() local
86 if (!rh || !handler) { in rethook_alloc()
87 kfree(rh); in rethook_alloc()
91 rh->data = data; in rethook_alloc()
92 rh->handler = handler; in rethook_alloc()
93 rh->pool.head = NULL; in rethook_alloc()
94 refcount_set(&rh->ref, 1); in rethook_alloc()
96 return rh; in rethook_alloc()
107 void rethook_add_node(struct rethook *rh, struct rethook_node *node) in rethook_add_node() argument
109 node->rethook = rh; in rethook_add_node()
110 freelist_add(&node->freelist, &rh->pool); in rethook_add_node()
111 refcount_inc(&rh->ref); in rethook_add_node()
148 struct rethook_node *rethook_try_get(struct rethook *rh) in rethook_try_get() argument
150 rethook_handler_t handler = READ_ONCE(rh->handler); in rethook_try_get()
168 fn = freelist_try_get(&rh->pool); in rethook_try_get()
200 struct rethook_node *rh = NULL; in __rethook_find_ret_addr() local
209 rh = container_of(node, struct rethook_node, llist); in __rethook_find_ret_addr()
210 if (rh->ret_addr != (unsigned long)arch_rethook_trampoline) { in __rethook_find_ret_addr()
212 return rh->ret_addr; in __rethook_find_ret_addr()