Commit ec957ab5 authored by William Roche's avatar William Roche Committed by Zheng Zengkai
Browse files

RAS/CEC: Correct ce_add_elem()'s returned values



stable inclusion
from stable-5.10.30
commit 674ddb52f94b2cf1563e19004debc1f03101138c
bugzilla: 51791

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

commit 3a62583c upstream.

ce_add_elem() uses different return values to signal a result from
adding an element to the collector. Commit in Fixes: broke the case
where the element being added is not found in the array. Correct that.

 [ bp: Rewrite commit message, add kernel-doc comments. ]

Fixes: de0e0624 ("RAS/CEC: Check count_threshold unconditionally")
Signed-off-by: default avatarWilliam Roche <william.roche@oracle.com>
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Cc: <stable@vger.kernel.org>
Link: https://lkml.kernel.org/r/1617722939-29670-1-git-send-email-william.roche@oracle.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Acked-by: default avatar  Weilong Chen <chenweilong@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent d6a191e4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment