aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mm_types.h
diff options
context:
space:
mode:
authorOlaf Hering <olaf@aepfle.de>2007-10-16 23:30:12 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-17 08:43:00 -0700
commit4f9a58d75bfe82ab2b8ba5b8506dfb190a267834 (patch)
tree791843f8cd609cb626a65c4004009084d87170d4 /include/linux/mm_types.h
parentvfs: use the predefined d_unhashed inline function instead (diff)
downloadlinux-dev-4f9a58d75bfe82ab2b8ba5b8506dfb190a267834.tar.xz
linux-dev-4f9a58d75bfe82ab2b8ba5b8506dfb190a267834.zip
increase AT_VECTOR_SIZE to terminate saved_auxv properly
include/asm-powerpc/elf.h has 6 entries in ARCH_DLINFO. fs/binfmt_elf.c has 14 unconditional NEW_AUX_ENT entries and 2 conditional NEW_AUX_ENT entries. So in the worst case, saved_auxv does not get an AT_NULL entry at the end. The saved_auxv array must be terminated with an AT_NULL entry. Make the size of mm_struct->saved_auxv arch dependend, based on the number of ARCH_DLINFO entries. Signed-off-by: Olaf Hering <olh@suse.de> Cc: Roland McGrath <roland@redhat.com> Cc: Jakub Jelinek <jakub@redhat.com> Cc: Richard Henderson <rth@twiddle.net> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/mm_types.h')
-rw-r--r--include/linux/mm_types.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index 877667918452..f4c03e0b355e 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -1,7 +1,7 @@
#ifndef _LINUX_MM_TYPES_H
#define _LINUX_MM_TYPES_H
-#include <linux/auxvec.h> /* For AT_VECTOR_SIZE */
+#include <linux/auxvec.h>
#include <linux/types.h>
#include <linux/threads.h>
#include <linux/list.h>
@@ -13,6 +13,11 @@
#include <asm/page.h>
#include <asm/mmu.h>
+#ifndef AT_VECTOR_SIZE_ARCH
+#define AT_VECTOR_SIZE_ARCH 0
+#endif
+#define AT_VECTOR_SIZE (2*(AT_VECTOR_SIZE_ARCH + AT_VECTOR_SIZE_BASE + 1))
+
struct address_space;
#if NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS