Re: [PATCH] chcr_ktls: fix a possible null-pointer dereference in chcr_ktls_dev_add()
From: Tuo Li
Date: Thu Nov 14 2024 - 05:37:14 EST
On 2024/11/8 21:34, Simon Horman wrote:
> On Tue, Nov 05, 2024 at 07:32:31AM +0800, Tuo Li wrote:
>> Hi Simon,
>>
>> Thanks for your reply! It is very helpful.
>> Any further feedback will be appreciated.
>
> Hi Tuo Li,
>
> 1. Please don't top-post on Linux mailing lists.
Apologies for the top-posting; I will avoid that in the future.
> 2. I think you need to do some careful analysis to understand
> if the condition you are concerned about can occur or not:
> can u_ctx ever be NULL in these code paths?
I have carefully reviewed the code paths, but I could not find any instance
where the variable u_ctx is assigned a NULL value. It might be a defensive
check to handle potential NULL values.