]> git.baikalelectronics.ru Git - kernel.git/commit
fail_function: fix wrong use of fei_attr_remove()
authorYang Yingliang <yangyingliang@huawei.com>
Fri, 26 Aug 2022 07:33:37 +0000 (15:33 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 12 Sep 2022 04:55:11 +0000 (21:55 -0700)
commitb85d4f4135124d40a97e3aa3f0846b367fddd0fe
tree06a9d500826ffe0e67fdd5fe0ce85ad372d6904c
parentc30b96404998e715b60a4438fe547da7ab4eff66
fail_function: fix wrong use of fei_attr_remove()

If register_kprobe() fails, the new attr is not added to the list yet, so
it should call fei_attr_free() intstead.

Link: https://lkml.kernel.org/r/20220826073337.2085798-3-yangyingliang@huawei.com
Fixes: 47e7d7270b31 ("error-injection: Support fault injection framework")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
kernel/fail_function.c