From: Arnaldo Carvalho de Melo Date: Thu, 11 Mar 2010 18:53:11 +0000 (-0300) Subject: perf record: Don't try to find buildids in a zero sized file X-Git-Tag: v2.6.34-rc2~19^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9f591fd76afdc0e5192e9ed00a36f8efc0b4dfe6;p=pandora-kernel.git perf record: Don't try to find buildids in a zero sized file Fixing this symptom: [acme@mica linux-2.6-tip]$ perf record -a -f Fatal: Permission error - are you root? Bus error [acme@mica linux-2.6-tip]$ I.e. if for some reason no data is collected, in this case a non root user trying to do systemwide profiling, no data will be collected, and then we end up trying to mmap a zero sized file and access the file header, b00m. Reported-by: Ingo Molnar Signed-off-by: Arnaldo Carvalho de Melo Cc: Frédéric Weisbecker Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Paul Mackerras Cc: LKML-Reference: <1268333592-30872-1-git-send-email-acme@infradead.org> Signed-off-by: Ingo Molnar --- Reading git-diff-tree failed