diff options
author | Alan Cox <alan@redhat.com> | 2008-05-23 13:04:31 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-24 09:56:09 -0700 |
commit | 80119ef5c8153e0a6cc5edf00c083dc98a9bd348 (patch) | |
tree | a2af11a3991b1bebe9d764ab6d4d28891e86eda2 /include/linux/mman.h | |
parent | 6c7c6afbb8c0e60d32a563cae7c6889211e9d9d8 (diff) | |
download | linux-80119ef5c8153e0a6cc5edf00c083dc98a9bd348.tar.gz linux-80119ef5c8153e0a6cc5edf00c083dc98a9bd348.tar.bz2 linux-80119ef5c8153e0a6cc5edf00c083dc98a9bd348.zip |
mm: fix atomic_t overflow in vm
The atomic_t type is 32bit but a 64bit system can have more than 2^32
pages of virtual address space available. Without this we overflow on
ludicrously large mappings
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/mman.h')
-rw-r--r-- | include/linux/mman.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/mman.h b/include/linux/mman.h index 87920a0852a3..dab8892e6ff1 100644 --- a/include/linux/mman.h +++ b/include/linux/mman.h @@ -17,14 +17,14 @@ extern int sysctl_overcommit_memory; extern int sysctl_overcommit_ratio; -extern atomic_t vm_committed_space; +extern atomic_long_t vm_committed_space; #ifdef CONFIG_SMP extern void vm_acct_memory(long pages); #else static inline void vm_acct_memory(long pages) { - atomic_add(pages, &vm_committed_space); + atomic_long_add(pages, &vm_committed_space); } #endif |