Re: [PATCH net 6/6] pds_core: make wait_context part of q_info
From: Simon Horman
Date: Wed Apr 09 2025 - 13:06:43 EST
On Mon, Apr 07, 2025 at 03:51:13PM -0700, Shannon Nelson wrote:
> Make the wait_context a full part of the q_info struct rather
> than a stack variable that goes away after pdsc_adminq_post()
> is done so that the context is still available after the wait
> loop has given up.
>
> There was a case where a slow development firmware caused
> the adminq request to time out, but then later the FW finally
> finished the request and sent the interrupt. The handler tried
> to complete_all() the completion context that had been created
> on the stack in pdsc_adminq_post() but no longer existed.
> This caused bad pointer usage, kernel crashes, and much wailing
> and gnashing of teeth.
>
> Fixes: 01ba61b55b20 ("pds_core: Add adminq processing and commands")
> Signed-off-by: Shannon Nelson <shannon.nelson@xxxxxxx>
Reviewed-by: Simon Horman <horms@xxxxxxxxxx>