Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tun: Fix the error of calling tun_close when tun_txavail or tun_txavail_work is executed #11009

Merged
merged 2 commits into from Oct 24, 2023

Conversation

zhhyu7
Copy link
Contributor

@zhhyu7 zhhyu7 commented Oct 24, 2023

Summary

When tun_txavail_work is running, switch to tun_close thread and priv->lock will be destroyed, then switch back to tun_txavail_work thread, an error will occur when nxmutex_unlock(&priv->lock).

The previous modified mode was found to have a deadlock(net_lock and tun_lock) problem after stress testing, revert the previous patch, the new implementation was fix the error and avoids the deadlock issue.

Impact

Testing

Cortex-M33

…un_txavail_work is executed"

This reverts commit 0f1a49b.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
drivers/net/tun.c Show resolved Hide resolved
…il_work is executed

When tun_txavail_work is running, switch to tun_close thread and priv->lock will be destroyed, then switch back to tun_txavail_work thread, an error will occur when nxmutex_unlock(&priv->lock)

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
@xiaoxiang781216 xiaoxiang781216 merged commit 5374af0 into apache:master Oct 24, 2023
26 checks passed
@jerpelea jerpelea added this to To-Add in Release Notes - 12.4.0 Dec 27, 2023
@jerpelea jerpelea moved this from To-Add to Net in Release Notes - 12.4.0 Jan 8, 2024
@jerpelea jerpelea moved this from Net to processed in Release Notes - 12.4.0 Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants