Lines Matching refs:ri
1703 static struct return_instance *free_ret_instance(struct return_instance *ri) in free_ret_instance() argument
1705 struct return_instance *next = ri->next; in free_ret_instance()
1706 put_uprobe(ri->uprobe); in free_ret_instance()
1707 kfree(ri); in free_ret_instance()
1718 struct return_instance *ri; in uprobe_free_utask() local
1726 ri = utask->return_instances; in uprobe_free_utask()
1727 while (ri) in uprobe_free_utask()
1728 ri = free_ret_instance(ri); in uprobe_free_utask()
1849 struct return_instance *ri = utask->return_instances; in cleanup_return_instances() local
1852 while (ri && !arch_uretprobe_is_alive(ri, ctx, regs)) { in cleanup_return_instances()
1853 ri = free_ret_instance(ri); in cleanup_return_instances()
1856 utask->return_instances = ri; in cleanup_return_instances()
1861 struct return_instance *ri; in prepare_uretprobe() local
1880 ri = kmalloc(sizeof(struct return_instance), GFP_KERNEL); in prepare_uretprobe()
1881 if (!ri) in prepare_uretprobe()
1910 ri->uprobe = get_uprobe(uprobe); in prepare_uretprobe()
1911 ri->func = instruction_pointer(regs); in prepare_uretprobe()
1912 ri->stack = user_stack_pointer(regs); in prepare_uretprobe()
1913 ri->orig_ret_vaddr = orig_ret_vaddr; in prepare_uretprobe()
1914 ri->chained = chained; in prepare_uretprobe()
1917 ri->next = utask->return_instances; in prepare_uretprobe()
1918 utask->return_instances = ri; in prepare_uretprobe()
1922 kfree(ri); in prepare_uretprobe()
2105 handle_uretprobe_chain(struct return_instance *ri, struct pt_regs *regs) in handle_uretprobe_chain() argument
2107 struct uprobe *uprobe = ri->uprobe; in handle_uretprobe_chain()
2113 uc->ret_handler(uc, ri->func, regs); in handle_uretprobe_chain()
2118 static struct return_instance *find_next_ret_chain(struct return_instance *ri) in find_next_ret_chain() argument
2123 chained = ri->chained; in find_next_ret_chain()
2124 ri = ri->next; /* can't be NULL if chained */ in find_next_ret_chain()
2127 return ri; in find_next_ret_chain()
2133 struct return_instance *ri, *next; in handle_trampoline() local
2140 ri = utask->return_instances; in handle_trampoline()
2141 if (!ri) in handle_trampoline()
2151 next = find_next_ret_chain(ri); in handle_trampoline()
2154 instruction_pointer_set(regs, ri->orig_ret_vaddr); in handle_trampoline()
2157 handle_uretprobe_chain(ri, regs); in handle_trampoline()
2158 ri = free_ret_instance(ri); in handle_trampoline()
2160 } while (ri != next); in handle_trampoline()
2163 utask->return_instances = ri; in handle_trampoline()