Commit 69285f47 authored by Tom Zanussi's avatar Tom Zanussi Committed by Zheng Zengkai
Browse files

tracing: Don't inc err_log entry count if entry allocation fails

stable inclusion
from stable-v5.10.96
commit 39986696fef531fde14c87038dcef9537e6aee87
bugzilla: https://gitee.com/openeuler/kernel/issues/I55NWB

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=39986696fef531fde14c87038dcef9537e6aee87

--------------------------------

commit 67ab5eb7 upstream.

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: 2f754e77 ("tracing: Don't inc err_log entry count if entry allocation fails")
Signed-off-by: default avatarTom Zanussi <zanussi@kernel.org>
Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarYu Liao <liaoyu15@huawei.com>
Reviewed-by: default avatarWei Li <liwei391@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent c930fd89
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment