if (flag != US_DISARM)
file->loaded = 0;
+ file->vm_start = 0;
+ file->vm_end = 0;
+ }
return err;
}
*/
void sspt_file_set_mapping(struct sspt_file *file, struct vm_area_struct *vma)
{
- file->vm_start = vma->vm_start;
- file->vm_end = vma->vm_end;
+ if (file->loaded == 0) {
+ file->loaded = 1;
+ file->vm_start = vma->vm_start;
+ file->vm_end = vma->vm_end;
+ }
}
struct list_head list; /**< For sspt_proc */
struct sspt_proc *proc; /**< Pointer to the proc (parent) */
struct dentry *dentry; /**< Dentry of file */
- int loaded; /**< Flag of loading */
unsigned long vm_start; /**< VM start */
unsigned long vm_end; /**< VM end */
unsigned long page_probes_hash_bits; /**< Hash-table size */
struct hlist_head *page_probes_table; /**< Hash-table for pages */
+
+ unsigned loaded:1; /**< Flag of loading */
};
struct sspt_file *file = sspt_proc_find_file(proc, dentry);
if (file) {
struct sspt_page *page;
- if (!file->loaded) {
- sspt_file_set_mapping(file, vma);
- file->loaded = 1;
- }
+
+ sspt_file_set_mapping(file, vma);
page = sspt_find_page_mapped(file, page_addr);
if (page)
struct sspt_file *file =
sspt_proc_find_file(proc, dentry);
if (file) {
- if (!file->loaded) {
- file->loaded = 1;
- sspt_file_set_mapping(file, vma);
- }
-
+ sspt_file_set_mapping(file, vma);
sspt_file_install(file);
}
}