if (obj) {
int i, table_size;
+ INIT_LIST_HEAD(&obj->list);
+ obj->procs = NULL;
obj->name = name;
obj->dentry = dentry;
obj->loaded = 0;
static void sspt_add_page(struct sspt_file *file, struct sspt_page *page)
{
+ page->file = file;
hlist_add_head(&page->hlist, &file->page_probes_table[hash_ptr((void *)page->offset,
file->page_probes_hash_bits)]);
}
struct hlist_head *head = NULL;
int i, table_size;
INIT_LIST_HEAD(&file_out->list);
+ file_out->procs = NULL;
file_out->dentry = file->dentry;
file_out->name = file->name;
file_out->loaded = 0;
obj->offset = offset;
obj->install = 0;
spin_lock_init(&obj->lock);
+ obj->file = NULL;
INIT_HLIST_NODE(&obj->hlist);
}
kfree(page);
}
+static void sspt_list_add_ip(struct sspt_page *page, struct us_ip *ip)
+{
+ list_add(&ip->list, &page->ip_list);
+ ip->page = page;
+}
+
struct sspt_page *sspt_page_copy(const struct sspt_page *page)
{
struct us_ip *ip, *new_ip;
return NULL;
}
- list_add(&new_ip->list, &new_page->ip_list);
+ sspt_list_add_ip(new_page, new_ip);
}
new_page->offset = page->offset;
new_page->install = 0;
spin_lock_init(&new_page->lock);
INIT_HLIST_NODE(&new_page->hlist);
+ new_page->file = NULL;
}
return new_page;
}
}
- INIT_LIST_HEAD(&ip->list);
- list_add(&ip->list, &page->ip_list);
+ sspt_list_add_ip(page, ip);
}
struct us_ip *sspt_find_ip(struct sspt_page *page, unsigned long offset)
static void sspt_procs_add_file(struct sspt_procs *procs, struct sspt_file *file)
{
list_add(&file->list, &procs->file_list);
+ file->procs = procs;
}
struct sspt_file *sspt_procs_find_file_or_new(struct sspt_procs *procs,