Re: [bugfix] try_to_unmap_cluster() passes out-of-bounds pte to pte_unmap()

Andrew Morton
2005-05-22T22:01:23Z

William Lee Irwin III <wli@holomorphy.com> wrote:
>
> try_to_unmap_cluster() does:
> for (pte = pte_offset_map(pmd, address);
> address < end; pte++, address += PAGE_SIZE) {
> ...
> }
>
> pte_unmap(pte);
>
> It may take a little staring to notice, but pte can actually fall off
> the end of the pte page in this iteration,

That's about the third place we've had this bug. Whoever keeps adding it
really should stop.

Thanks.