mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] accel/qaic: tolerate absent crashdump state during cleanup
@ 2026-09-13 12:52 Slavin Liu
  2026-10-02 17:15 ` Jeff Hugo
  0 siblings, 1 reply; 2+ messages in thread
From: Slavin Liu @ 2026-09-13 12:52 UTC (permalink / raw)
  To: jeff.hugo, ogabbay
  Cc: carl.vanderlip, linux-arm-msm, dri-devel, linux-kernel, bolin.liu

A negative response can be sent before crashdump state is assigned.
If queuing that response fails, cleanup receives NULL. Treat that as
no owned crashdump resources instead of dereferencing it.

Detected by static analysis and reviewed with AI-assisted source auditing.

Fixes: 6bc1fe6c748c ("accel/qaic: Collect crashdump from SSR channel")
Assisted-by: LLM
Signed-off-by: Slavin Liu <bolin.liu@seu.edu.cn>
---
 drivers/accel/qaic/qaic_ssr.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/accel/qaic/qaic_ssr.c b/drivers/accel/qaic/qaic_ssr.c
index a98928654959..d9ba1d333cdb 100644
--- a/drivers/accel/qaic/qaic_ssr.c
+++ b/drivers/accel/qaic/qaic_ssr.c
@@ -194,7 +194,11 @@ struct dump_file_meta {
 
 static void free_ssr_dump_info(struct ssr_crashdump *ssr_crash)
 {
-	struct ssr_dump_info *dump_info = ssr_crash->dump_info;
+	struct ssr_dump_info *dump_info;
+
+	if (!ssr_crash)
+		return;
+	dump_info = ssr_crash->dump_info;
 
 	ssr_crash->dump_info = NULL;
 	if (!dump_info)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] accel/qaic: tolerate absent crashdump state during cleanup
  2026-09-13 12:52 [PATCH] accel/qaic: tolerate absent crashdump state during cleanup Slavin Liu
@ 2026-10-02 17:15 ` Jeff Hugo
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Hugo @ 2026-10-02 17:15 UTC (permalink / raw)
  To: Slavin Liu, ogabbay
  Cc: carl.vanderlip, linux-arm-msm, dri-devel, linux-kernel

On 9/13/2026 6:52 AM, Slavin Liu wrote:
> A negative response can be sent before crashdump state is assigned.
> If queuing that response fails, cleanup receives NULL. Treat that as
> no owned crashdump resources instead of dereferencing it.

Please describe the exact sequence of functions which triggers this 
scenario.  I don't see it.

The change clearly protects against the ssr_crash parameter being NULL, 
but that doesn't occur in relation to queuing responses.

> Detected by static analysis and reviewed with AI-assisted source auditing.
> 
> Fixes: 6bc1fe6c748c ("accel/qaic: Collect crashdump from SSR channel")
> Assisted-by: LLM
> Signed-off-by: Slavin Liu <bolin.liu@seu.edu.cn>
> ---
>   drivers/accel/qaic/qaic_ssr.c | 6 +++++-
>   1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/accel/qaic/qaic_ssr.c b/drivers/accel/qaic/qaic_ssr.c
> index a98928654959..d9ba1d333cdb 100644
> --- a/drivers/accel/qaic/qaic_ssr.c
> +++ b/drivers/accel/qaic/qaic_ssr.c
> @@ -194,7 +194,11 @@ struct dump_file_meta {
>   
>   static void free_ssr_dump_info(struct ssr_crashdump *ssr_crash)
>   {
> -	struct ssr_dump_info *dump_info = ssr_crash->dump_info;
> +	struct ssr_dump_info *dump_info;
> +
> +	if (!ssr_crash)
> +		return;
> +	dump_info = ssr_crash->dump_info;
>   
>   	ssr_crash->dump_info = NULL;
>   	if (!dump_info)


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-10-02 17:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-13 12:52 [PATCH] accel/qaic: tolerate absent crashdump state during cleanup Slavin Liu
2026-10-02 17:15 ` Jeff Hugo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®