* [PATCH] arm64/sme: Fix NULL check after kzalloc
@ 2022-04-26 11:30 ` Wan Jiabing
0 siblings, 0 replies; 6+ messages in thread
From: Wan Jiabing @ 2022-04-26 11:30 UTC (permalink / raw)
To: Catalin Marinas, Will Deacon, Mark Brown, Mark Rutland,
Marc Zyngier, Madhavan T. Venkataraman, D Scott Phillips,
linux-arm-kernel, linux-kernel
Cc: Wan Jiabing
Fix following coccicheck error:
./arch/arm64/kernel/process.c:322:2-23: alloc with no test, possible model on line 326
Here should be dst->thread.sve_state.
Fixes: 8bd7f91c03d8 ("arm64/sme: Implement traps and syscall handling for SME")
Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
---
arch/arm64/kernel/process.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c
index 99c293513817..9734c9fb1a32 100644
--- a/arch/arm64/kernel/process.c
+++ b/arch/arm64/kernel/process.c
@@ -321,7 +321,7 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
if (thread_za_enabled(&src->thread)) {
dst->thread.sve_state = kzalloc(sve_state_size(src),
GFP_KERNEL);
- if (!dst->thread.za_state)
+ if (!dst->thread.sve_state)
return -ENOMEM;
dst->thread.za_state = kmemdup(src->thread.za_state,
za_state_size(src),
--
2.35.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] arm64/sme: Fix NULL check after kzalloc
@ 2022-04-26 11:30 ` Wan Jiabing
0 siblings, 0 replies; 6+ messages in thread
From: Wan Jiabing @ 2022-04-26 11:30 UTC (permalink / raw)
To: Catalin Marinas, Will Deacon, Mark Brown, Mark Rutland,
Marc Zyngier, Madhavan T. Venkataraman, D Scott Phillips,
linux-arm-kernel, linux-kernel
Cc: Wan Jiabing
Fix following coccicheck error:
./arch/arm64/kernel/process.c:322:2-23: alloc with no test, possible model on line 326
Here should be dst->thread.sve_state.
Fixes: 8bd7f91c03d8 ("arm64/sme: Implement traps and syscall handling for SME")
Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
---
arch/arm64/kernel/process.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c
index 99c293513817..9734c9fb1a32 100644
--- a/arch/arm64/kernel/process.c
+++ b/arch/arm64/kernel/process.c
@@ -321,7 +321,7 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
if (thread_za_enabled(&src->thread)) {
dst->thread.sve_state = kzalloc(sve_state_size(src),
GFP_KERNEL);
- if (!dst->thread.za_state)
+ if (!dst->thread.sve_state)
return -ENOMEM;
dst->thread.za_state = kmemdup(src->thread.za_state,
za_state_size(src),
--
2.35.3
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] arm64/sme: Fix NULL check after kzalloc
2022-04-26 11:30 ` Wan Jiabing
@ 2022-04-26 11:45 ` Mark Brown
-1 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2022-04-26 11:45 UTC (permalink / raw)
To: Wan Jiabing
Cc: Catalin Marinas, Will Deacon, Mark Rutland, Marc Zyngier,
Madhavan T. Venkataraman, D Scott Phillips, linux-arm-kernel,
linux-kernel
[-- Attachment #1: Type: text/plain, Size: 279 bytes --]
On Tue, Apr 26, 2022 at 07:30:53PM +0800, Wan Jiabing wrote:
> Fix following coccicheck error:
> ./arch/arm64/kernel/process.c:322:2-23: alloc with no test, possible model on line 326
>
> Here should be dst->thread.sve_state.
Reviwed-by: Mark Brown <broonie@kernel.org>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] arm64/sme: Fix NULL check after kzalloc
@ 2022-04-26 11:45 ` Mark Brown
0 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2022-04-26 11:45 UTC (permalink / raw)
To: Wan Jiabing
Cc: Catalin Marinas, Will Deacon, Mark Rutland, Marc Zyngier,
Madhavan T. Venkataraman, D Scott Phillips, linux-arm-kernel,
linux-kernel
[-- Attachment #1.1: Type: text/plain, Size: 279 bytes --]
On Tue, Apr 26, 2022 at 07:30:53PM +0800, Wan Jiabing wrote:
> Fix following coccicheck error:
> ./arch/arm64/kernel/process.c:322:2-23: alloc with no test, possible model on line 326
>
> Here should be dst->thread.sve_state.
Reviwed-by: Mark Brown <broonie@kernel.org>
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] arm64/sme: Fix NULL check after kzalloc
2022-04-26 11:30 ` Wan Jiabing
@ 2022-04-29 19:20 ` Catalin Marinas
-1 siblings, 0 replies; 6+ messages in thread
From: Catalin Marinas @ 2022-04-29 19:20 UTC (permalink / raw)
To: Mark Brown, Mark Rutland, linux-arm-kernel, Will Deacon,
D Scott Phillips, linux-kernel, Madhavan T. Venkataraman,
Marc Zyngier, Wan Jiabing
On Tue, 26 Apr 2022 19:30:53 +0800, Wan Jiabing wrote:
> Fix following coccicheck error:
> ./arch/arm64/kernel/process.c:322:2-23: alloc with no test, possible model on line 326
>
> Here should be dst->thread.sve_state.
>
>
Applied to arm64 (for-next/sme), thanks!
[1/1] arm64/sme: Fix NULL check after kzalloc
https://git.kernel.org/arm64/c/2e29b9971ac5
--
Catalin
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] arm64/sme: Fix NULL check after kzalloc
@ 2022-04-29 19:20 ` Catalin Marinas
0 siblings, 0 replies; 6+ messages in thread
From: Catalin Marinas @ 2022-04-29 19:20 UTC (permalink / raw)
To: Mark Brown, Mark Rutland, linux-arm-kernel, Will Deacon,
D Scott Phillips, linux-kernel, Madhavan T. Venkataraman,
Marc Zyngier, Wan Jiabing
On Tue, 26 Apr 2022 19:30:53 +0800, Wan Jiabing wrote:
> Fix following coccicheck error:
> ./arch/arm64/kernel/process.c:322:2-23: alloc with no test, possible model on line 326
>
> Here should be dst->thread.sve_state.
>
>
Applied to arm64 (for-next/sme), thanks!
[1/1] arm64/sme: Fix NULL check after kzalloc
https://git.kernel.org/arm64/c/2e29b9971ac5
--
Catalin
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-04-29 19:21 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-26 11:30 [PATCH] arm64/sme: Fix NULL check after kzalloc Wan Jiabing
2022-04-26 11:30 ` Wan Jiabing
2022-04-26 11:45 ` Mark Brown
2022-04-26 11:45 ` Mark Brown
2022-04-29 19:20 ` Catalin Marinas
2022-04-29 19:20 ` Catalin Marinas
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.