Re: [RESEND PATCH 1/3] uprobes: Remove redundantlock_page/unlock_page

From: Oleg Nesterov
Date: Fri Jun 01 2012 - 14:54:25 EST


On 06/01, Srikar Dronamraju wrote:
>
> @@ -315,12 +315,10 @@ static int read_opcode(struct mm_struct *mm, unsigned long vaddr, uprobe_opcode_
> if (ret <= 0)
> return ret;
>
> - lock_page(page);
> vaddr_new = kmap_atomic(page);
> vaddr &= ~PAGE_MASK;
> memcpy(opcode, vaddr_new + vaddr, UPROBE_SWBP_INSN_SIZE);
> kunmap_atomic(vaddr_new);
> - unlock_page(page);

Great, this lock_page() was really confusing.

Oleg.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/