aboutsummaryrefslogtreecommitdiff
path: root/ipc/mqueue.c
diff options
context:
space:
mode:
authorWang Nan <wangnan0@huawei.com>2016-04-26 02:28:54 +0000
committerArnaldo Carvalho de Melo <acme@redhat.com>2016-04-26 10:56:08 -0300
commitb04b7023751bf6519eee64467b6477f0e7fb82a1 (patch)
tree94ceaf2de5da1dda1cf8ee386472ffca76c0c78b /ipc/mqueue.c
parent09623d79466e996f5dc2753e16f04fda6f078041 (diff)
perf evlist: Enforce ring buffer reading
Don't read broken data after 'head' pointer. Following commits will feed perf_evlist__mmap_read() with some 'head' pointers not maintained by kernel. If 'head' pointer breaks an event, we should avoid reading from the broken event. This can happen in backward ring buffer. For example: old head | | V V +---+------+----------+----+-----+--+ |..E|D....D|C........C|B..B|A....|E.| +---+------+----------+----+-----+--+ 'old' pointer points to the beginning of 'A' and trying read from it, but 'A' has been overwritten. In this case, don't try to read from 'A', simply return NULL. Signed-off-by: Wang Nan <wangnan0@huawei.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Zefan Li <lizefan@huawei.com> Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/1461637738-62722-2-git-send-email-wangnan0@huawei.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'ipc/mqueue.c')
0 files changed, 0 insertions, 0 deletions