aboutsummaryrefslogtreecommitdiff
path: root/include/linux/trace_recursion.h
diff options
context:
space:
mode:
authorSteven Rostedt (VMware) <[email protected]>2020-11-02 11:28:39 -0500
committerSteven Rostedt (VMware) <[email protected]>2020-11-02 15:58:32 -0500
commit561ca66910bf597f170be5a7aa531c4e05f8e9be (patch)
treef8bb7cf306ea1514a1609212ee16061ee0bb27cd /include/linux/trace_recursion.h
parentb02414c8f045ab3b9afc816c3735bc98c5c3d262 (diff)
tracing: Make -ENOMEM the default error for parse_synth_field()
parse_synth_field() returns a pointer and requires that errors get surrounded by ERR_PTR(). The ret variable is initialized to zero, but should never be used as zero, and if it is, it could cause a false return code and produce a NULL pointer dereference. It makes no sense to set ret to zero. Set ret to -ENOMEM (the most common error case), and have any other errors set it to something else. This removes the need to initialize ret on *every* error branch. Fixes: 761a8c58db6b ("tracing, synthetic events: Replace buggy strcat() with seq_buf operations") Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Steven Rostedt (VMware) <[email protected]>
Diffstat (limited to 'include/linux/trace_recursion.h')
0 files changed, 0 insertions, 0 deletions