* [PATCH] x86/mm/kmmio: correctly handle kzalloc return
@ 2020-10-20 8:43 Mugilraj Dhavachelvan
2020-10-20 9:34 ` Pekka Paalanen
0 siblings, 1 reply; 2+ messages in thread
From: Mugilraj Dhavachelvan @ 2020-10-20 8:43 UTC (permalink / raw)
Cc: dmugil2000, Steven Rostedt, Ingo Molnar, Karol Herbst,
Pekka Paalanen, Dave Hansen, Andy Lutomirski, Peter Zijlstra,
Thomas Gleixner, Borislav Petkov, x86, H. Peter Anvin,
linux-kernel, nouveau
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;
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] x86/mm/kmmio: correctly handle kzalloc return
2020-10-20 8:43 [PATCH] x86/mm/kmmio: correctly handle kzalloc return Mugilraj Dhavachelvan
@ 2020-10-20 9:34 ` Pekka Paalanen
0 siblings, 0 replies; 2+ messages in thread
From: Pekka Paalanen @ 2020-10-20 9:34 UTC (permalink / raw)
To: Mugilraj Dhavachelvan
Cc: Steven Rostedt, Ingo Molnar, Karol Herbst, Dave Hansen,
Andy Lutomirski, Peter Zijlstra, Thomas Gleixner, Borislav Petkov,
x86, H. Peter Anvin, linux-kernel, nouveau
[-- 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 --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-10-20 9:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-20 8:43 [PATCH] x86/mm/kmmio: correctly handle kzalloc return Mugilraj Dhavachelvan
2020-10-20 9:34 ` Pekka Paalanen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox