[Top] [All Lists]

Re: vmalloc bugs in 2.4.5???

To: Atsushi Nemoto <>
Subject: Re: vmalloc bugs in 2.4.5???
From: Ralf Baechle <>
Date: Thu, 27 Dec 2001 01:12:22 -0200
In-reply-to: <>; from on Thu, Dec 27, 2001 at 10:55:18AM +0900
References: <> <> <> <>
User-agent: Mutt/1.2.5i
On Thu, Dec 27, 2001 at 10:55:18AM +0900, Atsushi Nemoto wrote:

> >> In somewhere between 2.4.6 and 2.4.9, the call to flush_cache_all()
> >> disappered from vmalloc_area_pages().  I have a data corruption
> >> problem in vmalloc()ed area without this call.  I think we still
> >> need this call.
> ralf> Have you ever resolved this problem?  I've just doublechecked
> ralf> the vmalloc code and it seems as if it should be entirely safe
> ralf> without these two calls.  The tlb is flushed on vfree so no
> ralf> stale entries for a vmalloc address can ever be in the tlb at
> ralf> vmalloc time, so this flush_tlb_all() is just an expensive nop.
> ralf> And the same it true for flush_cache_all() no matter if caches
> ralf> are physically or virtually indexed.
> I am still using the patch and have not tried without the two calls
> recently...
> When I found this problem, I suppose that vmalloc called after
> free_pages causes the data corruption.  vmalloc can re-use pages freed
> by free_pages and it seems free_pages does not flush cache.  If
> vmalloc is to use a page which is associated with dirty cache and has
> different "color", virtual aliasing happens and data may be corrupt.
> Is this wrong?

Yes, you're right as for the cache.  But there is no reason for the
TLB flush, right?


<Prev in Thread] Current Thread [Next in Thread>