On Mon, Dec 01, 2025 at 03:35:04AM -0800, Breno Leitao wrote:
> might hit a similar problem to the one fixed by e5235eb6cfe0  ("net:
> netpoll: initialize work queue before error checks")
> 
> The code path would be:
>   * alloc_param_target()
>         * alloc_and_init()
>                 * kzalloc() fails and return NULL.
>                 * resume_wq() is still not initialized
>   fail:
>       * free_param_target()
>               * cancel_work_sync(&nt->resume_wq); and resume_wq is not
>                 initialized

Checking this a bit now and I'm not sure if we have the same problem. On 
alloc_param_target() the cleanup is simply kfree(nt).

free_param_target() is only called as part of netconsole module setup/cleanup 
but
only for targets that were succesfully added to the target list (so are 
guaranteed
to have resume_wq initialised) before we hit the error.

Let me know if I'm missing something!

-- 
Andre Carvalho

Reply via email to