expand_stack was broken. I fixed that, see the other patch posted to l-k
today. growsup faults must grab the write semaphore too of course.
> > - lock_vma_mappings(vma);
> > - spin_lock(&vma->vm_mm->page_table_lock);
> > vma->vm_pgoff += (end - vma->vm_start) >> PAGE_SHIFT;
> > + lock_vma_mappings(vma);
> > + spin_lock(&mm->page_table_lock);
> > vma->vm_start = end;
>
> Could be wrong with concurrent stack faults.
even if the growsdown faults would acquire only the read seamphore that
change would still be obviously right because there (madvise) we hold
the write semaphore, and even in the buggy 2.4.10pre4 the stack faults
at least grab the read semaphore so they cannot race.
Andrea
-
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/