]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
tracing: Add error checks to creation of event files
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>
Tue, 22 Nov 2016 23:32:03 +0000 (18:32 -0500)
committerSteven Rostedt <rostedt@goodmis.org>
Tue, 22 Nov 2016 23:32:03 +0000 (18:32 -0500)
commit7d436400223bb46e9f88e6bba6f8d867acf0d82c
tree7b4a3f9b4fc7f9e328616a01b9593f9db0197e6b
parent9dfed80d87ca2c365cd1004a91ef4ed716c8e44e
tracing: Add error checks to creation of event files

The creation of the set_event_pid file was assigned to a variable "entry"
but that variable was never used. Ideally, it should be used to check if the
file was created and warn if it was not.

The files header_page, header_event should also be checked and a warning if
they fail to be created.

The "enable" file was moved up, as it is a more crucial file to have and a
hard failure (return -ENOMEM) should be returned if it is not created.

Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/trace_events.c