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

From: David S. Miller (davem@redhat.com)
Date: Mon Mar 25 2002 - 23:00:31 EST


   From: Benjamin LaHaise <bcrl@redhat.com>
   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 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/



This archive was generated by hypermail 2b29 : Sun Mar 31 2002 - 22:00:10 EST