lkml.org 
[lkml]   [2004]   [Oct]   [16]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateSat, 16 Oct 2004 12:32:35 +0100
From christophpfister@bluemail ...
Subjectfailure in /mm/memory.c
hello

i found a failure in function remap_pte_range in memory.c

static inline void remap_pte_range(...)
{
unsigned long end;
unsigned long pfn;
address &= ~PMD_MASK;
end = address + size;
if (end > PMD_SIZE)
    end = PMD_SIZE;
pfn = phys_addr >> PAGE_SHIFT;
do {
    BUG_ON(!pte_none(*pte));
    if (!pfn_valid(pfn) || PageReserved(pfn_to_page(pfn))) *****
      set_pte(pte, pfn_pte(pfn, prot));
    address += PAGE_SIZE;
    pfn++;
    pte++;
    } while (address && (address < end));
}
by ****
the condition is wrong, because it just maps the page, if it's invalid or
reserved

correct: if (!(pfn_valid(pfn) || PageReserved(pfn_to_page(pfn))))
(it doesn't seems to be used, otherwise there must be bugs)

Yours sincerely,

Christoph Pfister

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

\
 
 \ /
  Last update: 2005-03-22 14:07    [from the cache]
©2003-2008