* Peter Zijlstra <peterz@xxxxxxxxxxxxx> [2011-11-25 15:54:46]: > On Fri, 2011-11-18 at 16:38 +0530, Srikar Dronamraju wrote: > > +static int read_opcode(struct mm_struct *mm, unsigned long vaddr, > > + uprobe_opcode_t *opcode) > > +{ > > + struct page *page; > > + void *vaddr_new; > > + int ret; > > + > > + ret = get_user_pages(NULL, mm, vaddr, 1, 0, 0, &page, NULL); > > + if (ret <= 0) > > + return ret; > > + > > + lock_page(page); > > + vaddr_new = kmap_atomic(page); > > + vaddr &= ~PAGE_MASK; > > BUG_ON(vaddr + uprobe_opcode_sz >= PAGE_SIZE); > Okay, will add BUG_ON. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. 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>