kernel-ark/fs/proc
Tejun Heo 9281acea6a kallsyms: make KSYM_NAME_LEN include space for trailing '\0'
KSYM_NAME_LEN is peculiar in that it does not include the space for the
trailing '\0', forcing all users to use KSYM_NAME_LEN + 1 when allocating
buffer.  This is nonsense and error-prone.  Moreover, when the caller
forgets that it's very likely to subtly bite back by corrupting the stack
because the last position of the buffer is always cleared to zero.

This patch increments KSYM_NAME_LEN by one and updates code accordingly.

* off-by-one bug in asm-powerpc/kprobes.h::kprobe_lookup_name() macro
  is fixed.

* Where MODULE_NAME_LEN and KSYM_NAME_LEN were used together,
  MODULE_NAME_LEN was treated as if it didn't include space for the
  trailing '\0'.  Fix it.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Acked-by: Paulo Marques <pmarques@grupopie.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-17 10:23:03 -07:00
..
array.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched 2007-07-16 11:02:49 -07:00
base.c kallsyms: make KSYM_NAME_LEN include space for trailing '\0' 2007-07-17 10:23:03 -07:00
generic.c procfs directory entry cleanup 2007-07-16 09:05:43 -07:00
inode-alloc.txt
inode.c Fix rmmod/read/write races in /proc entries 2007-07-16 09:05:39 -07:00
internal.h
kcore.c
kmsg.c
Makefile
mmu.c
nommu.c
proc_devtree.c
proc_misc.c Use boot based time for uptime in /proc 2007-07-16 09:05:41 -07:00
proc_sysctl.c Remove redundant check from proc_sys_setattr() 2007-05-08 11:15:10 -07:00
proc_tty.c Make /proc/tty/drivers use seq_list_xxx helpers 2007-07-16 09:05:42 -07:00
root.c
task_mmu.c
task_nommu.c
vmcore.c