linux/fs/proc
Mikulas Patocka a09a79f668 Don't lock guardpage if the stack is growing up
Linux kernel excludes guard page when performing mlock on a VMA with
down-growing stack. However, some architectures have up-growing stack
and locking the guard page should be excluded in this case too.

This patch fixes lvm2 on PA-RISC (and possibly other architectures with
up-growing stack). lvm2 calculates number of used pages when locking and
when unlocking and reports an internal error if the numbers mismatch.

[ Patch changed fairly extensively to also fix /proc/<pid>/maps for the
  grows-up case, and to move things around a bit to clean it all up and
  share the infrstructure with the /proc bits.

  Tested on ia64 that has both grow-up and grow-down segments  - Linus ]

Signed-off-by: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
Tested-by: Tony Luck <tony.luck@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-05-09 16:22:07 -07:00
..
array.c proc: protect mm start_code/end_code in /proc/pid/stat 2011-03-23 19:46:37 -07:00
base.c proc: do proper range check on readdir offset 2011-04-18 10:36:54 -07:00
cmdline.c
consoles.c
cpuinfo.c
devices.c
generic.c proc: make struct proc_dir_entry::namelen unsigned int 2011-03-23 19:46:37 -07:00
inode.c procfs: kill the global proc_mnt variable 2011-03-23 19:46:58 -07:00
internal.h procfs: kill the global proc_mnt variable 2011-03-23 19:46:58 -07:00
interrupts.c
Kconfig
kcore.c
kmsg.c
loadavg.c
Makefile
meminfo.c
mmu.c
nommu.c
page.c
proc_devtree.c of/flattree: Drop an uninteresting message to pr_debug level 2011-03-02 13:45:18 -07:00
proc_net.c
proc_sysctl.c Merge branch 'next' into for-linus 2011-03-16 09:41:17 +11:00
proc_tty.c
root.c procfs: kill the global proc_mnt variable 2011-03-23 19:46:58 -07:00
softirqs.c
stat.c
task_mmu.c Don't lock guardpage if the stack is growing up 2011-05-09 16:22:07 -07:00
task_nommu.c report errors in /proc/*/*map* sanely 2011-03-23 16:36:50 -04:00
uptime.c
version.c
vmcore.c