Hugh Dickins 9c24624727 KSYM_SYMBOL_LEN fixes
Miles Lane tailing /sys files hit a BUG which Pekka Enberg has tracked
to my 966c8c12dc9e77f931e2281ba25d2f0244b06949 sprint_symbol(): use
less stack exposing a bug in slub's list_locations() -
kallsyms_lookup() writes a 0 to namebuf[KSYM_NAME_LEN-1], but that was
beyond the end of page provided.

The 100 slop which list_locations() allows at end of page looks roughly
enough for all the other stuff it might print after the symbol before
it checks again: break out KSYM_SYMBOL_LEN earlier than before.

Latencytop and ftrace and are using KSYM_NAME_LEN buffers where they
need KSYM_SYMBOL_LEN buffers, and vmallocinfo a 2*KSYM_NAME_LEN buffer
where it wants a KSYM_SYMBOL_LEN buffer: fix those before anyone copies
them.

[akpm@linux-foundation.org: ftrace.h needs module.h]
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc Miles Lane <miles.lane@gmail.com>
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Steven Rostedt <srostedt@redhat.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-12-10 08:01:54 -08:00
..
2008-10-22 18:48:45 -05:00
2008-10-27 08:40:17 -07:00
2008-08-20 15:40:32 -07:00
2008-10-13 09:47:43 +11:00
2008-11-13 13:22:34 -06:00
2008-11-06 15:41:22 -08:00
2008-11-01 09:49:46 -07:00
2008-10-23 05:12:58 -04:00
2008-10-17 02:38:36 +11:00
2008-12-01 19:55:25 -08:00
2008-11-18 15:08:56 +01:00
2008-12-10 08:01:54 -08:00
2008-11-27 17:38:28 +01:00
2008-07-26 20:53:40 -04:00
2008-07-26 12:00:08 -07:00
2008-10-16 11:21:38 -07:00
2008-10-09 08:57:05 +02:00
2008-12-04 04:22:57 -05:00
2008-11-27 17:38:28 +01:00
2008-10-23 05:12:59 -04:00
2008-10-30 11:38:45 -07:00
2008-11-19 18:49:59 -08:00
2008-11-12 17:17:17 -08:00
2008-11-01 09:49:46 -07:00
2008-07-25 10:53:35 -07:00
2008-10-30 11:38:45 -07:00