aboutsummaryrefslogtreecommitdiffstats
path: root/init/main.c
diff options
context:
space:
mode:
authorLiming Wang <liming.wang@windriver.com>2008-11-21 11:00:18 +0800
committerIngo Molnar <mingo@elte.hu>2008-11-21 08:49:52 +0100
commit522a110b42b306d696cf84e34c677ed0e7080194 (patch)
treea77d238aed14185cb5662daae5f01f0da405a834 /init/main.c
parentMerge master.kernel.org:/home/rmk/linux-2.6-arm (diff)
downloadlinux-dev-522a110b42b306d696cf84e34c677ed0e7080194.tar.xz
linux-dev-522a110b42b306d696cf84e34c677ed0e7080194.zip
function tracing: fix wrong position computing of stack_trace
Impact: make output of stack_trace complete if buffer overruns When read buffer overruns, the output of stack_trace isn't complete. When printing records with seq_printf in t_show, if the read buffer has overruned by the current record, then this record won't be printed to user space through read buffer, it will just be dropped in this printing. When next printing, t_start should return the "*pos"th record, which is the one dropped by previous printing, but it just returns (m->private + *pos)th record. Here we use a more sane method to implement seq_operations which can be found in kernel code. Thus we needn't initialize m->private. About testing, it's not easy to overrun read buffer, but we can use seq_printf to print more padding bytes in t_show, then it's easy to check whether or not records are lost. This commit has been tested on both condition of overrun and non overrun. Signed-off-by: Liming Wang <liming.wang@windriver.com> Acked-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'init/main.c')
0 files changed, 0 insertions, 0 deletions