]> git.baikalelectronics.ru Git - kernel.git/commit
tracing: Don't inc err_log entry count if entry allocation fails
authorTom Zanussi <zanussi@kernel.org>
Thu, 27 Jan 2022 21:44:18 +0000 (15:44 -0600)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Fri, 28 Jan 2022 00:15:49 +0000 (19:15 -0500)
commitbb0cb269ddd1ae0f39699c7c0581e919d67d171c
treeae6327fd65350efecba3258996d93e32b90ac279
parentef6ef84d527afe066eeef076546c316a71b98562
tracing: Don't inc err_log entry count if entry allocation fails

tr->n_err_log_entries should only be increased if entry allocation
succeeds.

Doing it when it fails won't cause any problems other than wasting an
entry, but should be fixed anyway.

Link: https://lkml.kernel.org/r/cad1ab28f75968db0f466925e7cba5970cec6c29.1643319703.git.zanussi@kernel.org
Cc: stable@vger.kernel.org
Fixes: 554ccafc722d7 ("tracing: Don't inc err_log entry count if entry allocation fails")
Signed-off-by: Tom Zanussi <zanussi@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
kernel/trace/trace.c