From: sashiko-bot@kernel.org
To: "Song Chen" <chensong_2000@126.com>
Cc: "Heiko Carstens" <hca@linux.ibm.com>,
"Alexander Gordeev" <agordeev@linux.ibm.com>,
"Vasily Gorbik" <gor@linux.ibm.com>,
linux-s390@vger.kernel.org
Subject: Re: [RFC PATCH v2 1/3] error-injection: Introduce EI_ETYPE_FALSE for fail_function
Date: Fri, 24 Jul 2026 02:20:44 +0000 [thread overview]
Message-ID: <20260724022044.F31F11F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260724021229.47302-2-chensong_2000@126.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The new EI_ETYPE_FALSE error injection type is missing string mapping in lib/error-inject.c and documentation updates, causing debugfs to report '(unknown)'.
--
--- Patch [1]: [RFC PATCH v2 1/3] error-injection: Introduce EI_ETYPE_FALSE for fail_function ---
commit 5374b818d585ee0b9130e232537545cf0e64070a
Author: Song Chen <chensong_2000@126.com>
error-injection: Introduce EI_ETYPE_FALSE for fail_function
This commit introduces a new error injection type, EI_ETYPE_FALSE. It is
intended for functions that require false as a return value during error
injection, such as btrfs_data_csum_ok.
> diff --git a/include/asm-generic/error-injection.h b/include/asm-generic/error-injection.h
> index b05253f68eaa5..6c399121ab7ab 100644
> --- a/include/asm-generic/error-injection.h
> +++ b/include/asm-generic/error-injection.h
> @@ -8,6 +8,7 @@ enum {
> EI_ETYPE_ERRNO, /* Return -ERRNO if failure */
> EI_ETYPE_ERRNO_NULL, /* Return -ERRNO or NULL if failure */
> EI_ETYPE_TRUE, /* Return true if failure */
> + EI_ETYPE_FALSE, /* Return false if failure */
[Severity: Medium]
Does this commit miss updating error_type_string() in lib/error-inject.c to
handle the new type?
Currently, error_type_string() maps the other enum values to strings, but
without an update here it appears it will fall through to the default case:
lib/error-inject.c:error_type_string() {
...
case EI_ETYPE_TRUE:
return "TRUE";
default:
return "(unknown)";
}
Won't this cause functions annotated with ALLOW_ERROR_INJECTION(..., FALSE)
to display as '(unknown)' in the /sys/kernel/debug/error_injection/list
debugfs file?
Also, should Documentation/fault-injection/fault-injection.rst be updated to
document EI_ETYPE_FALSE alongside EI_ETYPE_TRUE?
> };
>
> struct error_injection_entry {
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260724021229.47302-1-chensong_2000@126.com?part=1
next prev parent reply other threads:[~2026-07-24 2:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-24 2:12 [RFC PATCH v2 0/3] btrfs: add error injection support for checksum verification Song Chen
2026-07-24 2:12 ` Song Chen
2026-07-24 2:12 ` [RFC PATCH v2 1/3] error-injection: Introduce EI_ETYPE_FALSE for fail_function Song Chen
2026-07-24 2:12 ` Song Chen
2026-07-24 2:20 ` sashiko-bot [this message]
2026-07-24 2:12 ` [RFC PATCH v2 2/3] btrfs: Allow error injection on btrfs_data_csum_ok Song Chen
2026-07-24 2:12 ` Song Chen
2026-07-24 2:21 ` sashiko-bot
2026-07-24 2:12 ` [RFC PATCH v2 3/3] error-injection: Introduce parent in fei_attr Song Chen
2026-07-24 2:12 ` Song Chen
2026-07-24 2:25 ` sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260724022044.F31F11F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=agordeev@linux.ibm.com \
--cc=chensong_2000@126.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=linux-s390@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.