1. 12 Jan, 2005 2 commits
    • Marcelo Tosatti's avatar
      [PATCH] do_brk() needs mmap_sem write-locked · 6a424eda
      Marcelo Tosatti authored
      It seems to be general consensus that its safer to require all do_brk() callers
      to grab mmap_sem, and have do_brk to warn otherwise. This is what the following
      patch does.
      
      Similar version has been changed to in v2.4.
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      6a424eda
    • Linus Torvalds's avatar
      Handle two threads both trying to expand their stack simultaneously. · fa6e49a2
      Linus Torvalds authored
      We had all the locking right, but we didn't check whether one of the
      threads now no longer needed to expand, so we could incorrectly _shrink_
      the stack in the other thread instead (not only causing segfaults, but
      since we didn't do a proper unmap, we'd possibly leak pages too).
      
      So re-check the need for expand after getting the lock.
      
      Noticed by Paul Starzetz.
      fa6e49a2
  2. 11 Jan, 2005 38 commits