On 06/07, Srikar Dronamraju wrote: > > +static int write_opcode(struct task_struct *tsk, struct uprobe * uprobe, > + unsigned long vaddr, uprobe_opcode_t opcode) > +{ > + struct page *old_page, *new_page; > + void *vaddr_old, *vaddr_new; > + struct vm_area_struct *vma; > + unsigned long addr; > + int ret; > + > + /* Read the page with vaddr into memory */ > + ret = get_user_pages(tsk, tsk->mm, vaddr, 1, 1, 1, &old_page, &vma); Sorry if this was already discussed... But why we are using FOLL_WRITE here? We are not going to write into this page, and this provokes the unnecessary cow, no? Also. This is called under down_read(mmap_sem), can't we race with access_process_vm() modifying the same memory? Oleg. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxxx For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>