[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240223163251.49bd1870@kernel.org>
Date: Fri, 23 Feb 2024 16:32:51 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Jakub Raczynski <j.raczynski@...sung.com>
Cc: netdev@...r.kernel.org, alexandre.torgue@...s.st.com,
joabreu@...opsys.com
Subject: Re: [PATCH] stmmac: Clear variable when destroying workqueue
On Wed, 21 Feb 2024 15:32:33 +0100 Jakub Raczynski wrote:
> Currently when suspending driver and stopping workqueue it is checked whether
> workqueue is not NULL and if so, it is destroyed.
> Function destroy_workqueue() does drain queue and does clear variable, but
> it does not set workqueue variable to NULL. This can cause kernel/module
> panic if code attempts to clear workqueue that was not initialized.
Is there no risk that we'll try to queue_work() on the uninitialized
workqueue? I wonder if we should also set __FPE_REMOVING when the
queue allocation fails, just to make sure we never try to queue?
Please repost with a Fixes tag added (pointing to oldest commit where
the problem may happen), and with [PATCH net v2] as the subject tag.
--
pw-bot: cr
Powered by blists - more mailing lists