perf: Check permission only for parent tracepoint event
perf: Check permission only for parent tracepoint event

There's no need to check cloned event's permission once the
parent was already checked.

Also the code is checking 'current' process permissions, which
is not owner process for cloned events, thus could end up with
wrong permission check result.

Reported-by: Alexander Yarygin <9ca6bb7262616b7ce87466603a4e88c0d04eafde@linux.vnet.ibm.com>
Tested-by: Alexander Yarygin <9ca6bb7262616b7ce87466603a4e88c0d04eafde@linux.vnet.ibm.com>
Signed-off-by: Jiri Olsa <2c6594f608aa3d41e98d48846a6328831f7084ad@kernel.org>
Signed-off-by: Peter Zijlstra <3fddac958924aef220f202ca567388ddab3f14a8@infradead.org>
Cc: Arnaldo Carvalho de Melo <293abb6b76d7791c0732cc517d38c4b5c734b87f@kernel.org>
Cc: Corey Ashford <d8c6f216c17042adc228efa9f1d34ca50bd37e4b@linux.vnet.ibm.com>
Cc: Frederic Weisbecker <e8a1bf9163cb25e93cfd6540f223b3872ea7ee55@gmail.com>
Cc: Paul Mackerras <19a0ba370c443ba08d20b5061586430ab449ee8c@samba.org>
Cc: Linus Torvalds <69652caca27c8b940640ad396ab71f93cacec34f@linux-foundation.org>
Cc: Steven Rostedt <43232e92d70cc7aa53504ad0397085ee47bad87f@goodmis.org>
Link: http://lkml.kernel.org/r/1405079782-8139-1-git-send-email-2c6594f608aa3d41e98d48846a6328831f7084ad@kernel.org
Signed-off-by: Ingo Molnar <9dbbbf0688fedc85ad4da37637f1a64b8c718ee2@kernel.org>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs