{
unsigned long offset = 0;
struct sspt_page *page = NULL;
- struct sspt_ip *ip = NULL;
offset = img_ip->addr & PAGE_MASK;
page = sspt_find_page_or_new(file, offset);
if (!page)
return;
- ip = sspt_ip_create(img_ip, page);
- if (!ip)
- return;
-
- probe_info_init(ip->desc->type, ip);
+ /* Created the "ip" automatically added itself to necessary lists */
+ sspt_ip_create(img_ip, page);
}
void sspt_file_on_each_ip(struct sspt_file *file,
ip->offset = img_ip->addr & ~PAGE_MASK;
ip->desc = img_ip->desc;
atomic_set(&ip->usage, 2); /* for 'img_ip' and 'page' */
+ probe_info_init(ip->desc->type, ip);
/* add to img_ip list */
img_ip_get(img_ip);
{
WARN_ON(!list_empty(&ip->list) || !list_empty(&ip->img_list));
+ probe_info_uninit(ip->desc->type, ip);
kfree(ip);
}