Re: [PATCH] IB/mlx5: Fix potential NULL dereference in query_device
From: Prathamesh Deshpande
Date: Thu Apr 09 2026 - 21:07:37 EST
On Thu, Apr 9, 2026 at 12:51:58 +0300, Leon Romanovsky wrote:
> uhw is not guaranteed to be non-NULL in mlx5_ib_query_device(). This
> function is used in both kernel and user-space paths. The only condition
> that cannot occur is a caller providing a non-zero 'uhw_outlen' while
> passing a NULL 'uhw' pointer.
Hi Leon,
Thanks for the explanation. Since uhw_outlen effectively guards uhw
in these paths, I’ll drop this patch as a static analysis false positive.
Thanks,
Prathamesh