Re: [patch] mmap bug with drivers that adjust vm_start

David S. Miller (
Mon, 25 Mar 2002 20:00:31 -0800 (PST)

From: Benjamin LaHaise <>
Date: Mon, 25 Mar 2002 23:00:47 -0500

The patch below fixes a problem whereby a vma which has its vm_start
address changed by the file's mmap operation can result in the vma
being inserted into the wrong location within the vma tree. This
results in page faults not being handled correctly leading to SEGVs,
as well as various BUG()s hitting on exit of the mm. The fix is to
recalculate the insertion point when we know the address has changed.
Comments? Patch is against 2.4.19-pre4.

Good catch. Most of the time this happened to work because the driver
filled in the page tables completely (as is the case for most video
etc. drivers which use {io_,}remap_page_range et al..)

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at