linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Akinobu Mita <akinobu.mita@gmail.com>
To: "Barnabás Pőcze" <pobrn@protonmail.com>,
	"Andrew Morton" <akpm@linux-foundation.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Naveen N. Rao" <naveen.n.rao@linux.ibm.com>,
	Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH] fault-injection: handle EI_ETYPE_TRUE
Date: Thu, 15 Oct 2020 00:15:55 +0900	[thread overview]
Message-ID: <CAC5umyhd5pikGHEtZmjR3+10w1z3J9G6skXC7xSgC4zE=h36XA@mail.gmail.com> (raw)
In-Reply-To: <6bOOjFIyEwIPNLoY3wMdLuKENpcumphiNztVz7xDofD2Pkyv61mvDghklDSA3xNNCm7pC6XvqNeTCJ7vt1MsjrJZN5i0mbPK7YkE8Jgi1uw=@protonmail.com>

Hi Andrew,

Please consider taking this patch in the -mm tree.

This patch looks good to me.

Reviewed-by: Akinobu Mita <akinobu.mita@gmail.com>

2020年10月13日(火) 18:31 Barnabás Pőcze <pobrn@protonmail.com>:
>
> Hi,
>
> I had some difficulty finding who should receive this patch, and I am not
> sure I got it right. Could someone please confirm that any of you
> can take this patch, or should I resend it? (In that case, to whom?)
>
>
> Thank you,
> Barnabás Pőcze
>
>
> > Commit af3b854492f351d1ff3b4744a83bf5ff7eed4920
> > ("mm/page_alloc.c: allow error injection")
> > introduced EI_ETYPE_TRUE, but did not extend
> >
> > -   lib/error-inject.c:error_type_string(), and
> > -   kernel/fail_function.c:adjust_error_retval()
> >     to accommodate for this change.
> >
> >     Handle EI_ETYPE_TRUE in both functions appropriately by
> >
> > -   returning "TRUE" in error_type_string(),
> > -   adjusting the return value to true (1) in adjust_error_retval().
> >
> >     Furthermore, simplify the logic of handling EI_ETYPE_NULL
> >     in adjust_error_retval().
> >
> >     Signed-off-by: Barnabás Pőcze pobrn@protonmail.com
> >
> >
> > kernel/fail_function.c | 6 +++---
> > lib/error-inject.c | 2 ++
> > 2 files changed, 5 insertions(+), 3 deletions(-)
> >
> > diff --git a/kernel/fail_function.c b/kernel/fail_function.c
> > index 63b349168da7..4fdea01c0561 100644
> > --- a/kernel/fail_function.c
> > +++ b/kernel/fail_function.c
> > @@ -37,9 +37,7 @@ static unsigned long adjust_error_retval(unsigned long addr, unsigned long retv)
> > {
> > switch (get_injectable_error_type(addr)) {
> > case EI_ETYPE_NULL:
> >
> > -         if (retv != 0)
> >
> >
> > -             return 0;
> >
> >
> > -         break;
> >
> >
> >
> > -         return 0;
> >
> >
> >     case EI_ETYPE_ERRNO:
> >     if (retv < (unsigned long)-MAX_ERRNO)
> >     return (unsigned long)-EINVAL;
> >     @@ -48,6 +46,8 @@ static unsigned long adjust_error_retval(unsigned long addr, unsigned long retv)
> >     if (retv != 0 && retv < (unsigned long)-MAX_ERRNO)
> >     return (unsigned long)-EINVAL;
> >     break;
> >
> > -   case EI_ETYPE_TRUE:
> > -         return 1;
> >
> >
> >     }
> >
> >     return retv;
> >     diff --git a/lib/error-inject.c b/lib/error-inject.c
> >     index aa63751c916f..c73651b15b76 100644
> >     --- a/lib/error-inject.c
> >     +++ b/lib/error-inject.c
> >     @@ -180,6 +180,8 @@ static const char *error_type_string(int etype)
> >     return "ERRNO";
> >     case EI_ETYPE_ERRNO_NULL:
> >     return "ERRNO_NULL";
> >
> > -   case EI_ETYPE_TRUE:
> > -         return "TRUE";
> >
> >
> >     default:
> >     return "(unknown)";
> >     }
> >     --
> >     2.28.0
> >

      reply	other threads:[~2020-10-14 15:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-24 16:48 [PATCH] fault-injection: handle EI_ETYPE_TRUE Barnabás Pőcze
2020-09-24 17:10 ` Masami Hiramatsu
2020-10-13  9:31 ` Barnabás Pőcze
2020-10-14 15:15   ` Akinobu Mita [this message]

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='CAC5umyhd5pikGHEtZmjR3+10w1z3J9G6skXC7xSgC4zE=h36XA@mail.gmail.com' \
    --to=akinobu.mita@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=anil.s.keshavamurthy@intel.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=naveen.n.rao@linux.ibm.com \
    --cc=pobrn@protonmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).