From: Pekka Paalanen <ppaalanen@gmail.com>
To: Mugilraj Dhavachelvan <dmugil2000@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
Ingo Molnar <mingo@kernel.org>,
Karol Herbst <karolherbst@gmail.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
Andy Lutomirski <luto@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
Borislav Petkov <bp@alien8.de>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
linux-kernel@vger.kernel.org, nouveau@lists.freedesktop.org
Subject: Re: [PATCH] x86/mm/kmmio: correctly handle kzalloc return
Date: Tue, 20 Oct 2020 12:34:30 +0300 [thread overview]
Message-ID: <20201020123430.44968cb4@eldfell> (raw)
In-Reply-To: <20201020084345.96823-1-dmugil2000@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 783 bytes --]
On Tue, 20 Oct 2020 14:13:44 +0530
Mugilraj Dhavachelvan <dmugil2000@gmail.com> wrote:
> Replacing return value -1 to error code
>
> Signed-off-by: Mugilraj Dhavachelvan <dmugil2000@gmail.com>
> ---
> arch/x86/mm/kmmio.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/mm/kmmio.c b/arch/x86/mm/kmmio.c
> index be020a7bc414..15430520c232 100644
> --- a/arch/x86/mm/kmmio.c
> +++ b/arch/x86/mm/kmmio.c
> @@ -386,7 +386,7 @@ static int add_kmmio_fault_page(unsigned long addr)
>
> f = kzalloc(sizeof(*f), GFP_ATOMIC);
> if (!f)
> - return -1;
> + return -ENOMEN;
>
> f->count = 1;
> f->addr = addr;
Hi,
did you even build-test this?
Why did you write this patch? What does it achieve?
Thanks,
pq
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2020-10-20 9:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-20 8:43 [PATCH] x86/mm/kmmio: correctly handle kzalloc return Mugilraj Dhavachelvan
2020-10-20 9:34 ` Pekka Paalanen [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=20201020123430.44968cb4@eldfell \
--to=ppaalanen@gmail.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=dmugil2000@gmail.com \
--cc=hpa@zytor.com \
--cc=karolherbst@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@kernel.org \
--cc=nouveau@lists.freedesktop.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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