Re: [PATCH v4 3.0-rc2-tip 2/22] 2: uprobes: Breakground page replacement.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2011-06-07 at 18:28 +0530, Srikar Dronamraju wrote:
> +       ret = anon_vma_prepare(vma);
> +       if (ret)
> +               goto unlock_out;

You just leaked new_page.

> +
> +       lock_page(new_page);
> +       ret = __replace_page(vma, old_page, new_page);
> +       unlock_page(new_page);
> +       if (ret != 0)
> +               page_cache_release(new_page);
> +unlock_out:
> +       unlock_page(old_page);
> +
> +put_out:
> +       put_page(old_page); /* we did a get_page in the beginning */
> +       return ret;
> +} 

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


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]