Re: [PATCH v2 4/5] uprobes: cleanup and documentwrite_opcode()->lock_page(old_page)

From: Srikar Dronamraju
Date: Mon Jul 09 2012 - 06:29:50 EST


* Oleg Nesterov <oleg@xxxxxxxxxx> [2012-06-24 17:00:53]:

> The comment above write_opcode()->lock_page(old_page) tells about
> the race with do_wp_page(). I don't really understand which exactly
> race it means, but afaics this lock_page() was not enough to close
> all races with do_wp_page().
>
> Anyway, since 77fc4af1 this code is always called with ->mmap_sem
> hold for writing so we can forget about do_wp_page().
>
> However, we can't simply remove this lock_page(), and the only
> (afaics) reason is __replace_page()->try_to_free_swap().
>
> Nothing in write_opcode() needs it, move it into __replace_page()
> and fix the comment.
>
> Signed-off-by: Oleg Nesterov <oleg@xxxxxxxxxx>

Acked-by: Srikar Dronamraju <srikar@xxxxxxxxxxxxxxxxxx>

--
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/