From: patchwork-bot+netdevbpf@kernel.org
To: Jakub Raczynski <j.raczynski@samsung.com>
Cc: netdev@vger.kernel.org, kuba@kernel.org,
alexandre.torgue@foss.st.com, joabreu@synopsys.com
Subject: Re: [PATCH net v2] stmmac: Clear variable when destroying workqueue
Date: Wed, 28 Feb 2024 11:30:31 +0000 [thread overview]
Message-ID: <170911983190.5841.7484242460715131155.git-patchwork-notify@kernel.org> (raw)
In-Reply-To: <20240226164231.145848-1-j.raczynski@samsung.com>
Hello:
This patch was applied to netdev/net.git (main)
by David S. Miller <davem@davemloft.net>:
On Mon, 26 Feb 2024 17:42:32 +0100 you 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.
>
> This scenario is possible when resuming suspended driver in stmmac_resume(),
> because there is no handling for failed stmmac_hw_setup(),
> which can fail and return if DMA engine has failed to initialize,
> and workqueue is initialized after DMA engine.
> Should DMA engine fail to initialize, resume will proceed normally,
> but interface won't work and TX queue will eventually timeout,
> causing 'Reset adapter' error.
> This then does destroy workqueue during reset process.
> And since workqueue is initialized after DMA engine and can be skipped,
> it will cause kernel/module panic.
>
> [...]
Here is the summary with links:
- [net,v2] stmmac: Clear variable when destroying workqueue
https://git.kernel.org/netdev/net/c/8af411bbba1f
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
prev parent reply other threads:[~2024-02-28 11:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20240226154254eucas1p2bedde2c58f147809f83b23d455af9289@eucas1p2.samsung.com>
2024-02-26 15:42 ` [PATCH net v2] stmmac: Clear variable when destroying workqueue Jakub Raczynski
2024-02-26 15:57 ` Jiri Pirko
2024-02-26 16:42 ` Jakub Raczynski
2024-02-27 7:06 ` Jiri Pirko
2024-02-28 11:30 ` patchwork-bot+netdevbpf [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=170911983190.5841.7484242460715131155.git-patchwork-notify@kernel.org \
--to=patchwork-bot+netdevbpf@kernel.org \
--cc=alexandre.torgue@foss.st.com \
--cc=j.raczynski@samsung.com \
--cc=joabreu@synopsys.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).