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

Re: [PATCH 2.5.66-mm2] Fix page_convert_anon locking issues



--On Wednesday, April 02, 2003 15:38:45 -0800 Andrew Morton
<akpm@digeo.com> wrote:

> But:
> 
> +	/* Double check to make sure the pte page hasn't been freed */
> +	if (!pmd_present(*pmd))
> +		goto out_unmap;
> +
> 	==> munmap, pte page is freed, reallocated for pagecache, someone
> 	    happens to write the correct value into it.
> 	
> +	if (page_to_pfn(page) != pte_pfn(*pte))
> +		goto out_unmap;
> +
> +	if (addr)
> +		*addr = address;
> +

Oops.  The pmd_present() check should be after the page_to_pfn() !=
pte_pfn() check.

Dave

======================================================================
Dave McCracken          IBM Linux Base Kernel Team      1-512-838-3059
dmccr@us.ibm.com                                        T/L   678-3059

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org">aart@kvack.org</a>