Skip to content
Commit 8e50d384 authored by Zhouyi Zhou's avatar Zhouyi Zhou Committed by Arnaldo Carvalho de Melo
Browse files

perf tools: Fixup mmap event consumption



The tail position of the event buffer should only be modified after
actually use that event.

If not the event buffer could be invalid before use, and segment fault
occurs when invoking perf top -G.

Signed-off-by: default avatarZhouyi Zhou <yizhouzhou@ict.ac.cn>
Cc: David Ahern <dsahern@gmail.com>
Cc: Zhouyi Zhou <yizhouzhou@ict.ac.cn>
Link: http://lkml.kernel.org/r/1382600613-32177-1-git-send-email-zhouzhouyi@gmail.com


[ Simplified the logic using exit gotos and renamed write_tail method to mmap_consume ]
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent ae779a63
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment