public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Manfred Spraul" <manfred@colorfullife.com>
To: "Andrea Arcangeli" <andrea@suse.de>
Cc: <torvalds@transmeta.com>, <linux-kernel@vger.kernel.org>
Subject: Re: mmap-rb-7 [was Re: /proc/<n>/maps growing...]
Date: Mon, 3 Sep 2001 19:09:03 +0200	[thread overview]
Message-ID: <000f01c1349b$263fb890$010411ac@local> (raw)

> +/*
> + * vma->vm_start/vm_end cannot change under us because the caller is
required
> + * to hold the mmap_sem in write mode. We need to get the spinlock
only
> + * before relocating the vma range ourself.
> + */

There is one exception to that rule: a growable stack grows with
mmap_sem only acquired in read mode. vm_start can change on platforms
where the stack grows down, probably vm_end changes on platforms where
the stack grows upwards.

> - 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.

--
    Manfred


             reply	other threads:[~2001-09-03 17:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-03 17:09 Manfred Spraul [this message]
2001-09-03 17:20 ` mmap-rb-7 [was Re: /proc/<n>/maps growing...] Andrea Arcangeli
  -- strict thread matches above, loose matches on Subject: below --
2001-08-06 13:29 /proc/<n>/maps growing Andrea Arcangeli
2001-08-06 17:27 ` Linus Torvalds
2001-09-03 15:44   ` mmap-rb-7 [was Re: /proc/<n>/maps growing...] Andrea Arcangeli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000f01c1349b$263fb890$010411ac@local' \
    --to=manfred@colorfullife.com \
    --cc=andrea@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox