Re: [PATCH] A new entry for /proc

From: Mauricio Lin
Date: Wed Mar 02 2005 - 07:22:04 EST


Does anyone know if the place I put pte_unmap is logical and safe
after several pte increments?

pte = pte_offset_map(pmd, address);
address &= ~PMD_MASK;
end = address + size;
if (end > PMD_SIZE)
end = PMD_SIZE;
do {
pte_t page = *pte;

address += PAGE_SIZE;
pte++;
if (pte_none(page) || (!pte_present(page)))
continue;
*rss += PAGE_SIZE;
} while (address < end);
pte_unmap(pte);

BR,

Mauricio Lin.
-
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/