Re: [PATCH net v2] net: libwx: fix concurrent bitmap overwrite in PTP setup
| Newsgroups | org.kernel.vger.netdev |
|---|---|
| Message-ID | <178743062638.1819488.16681314131778251958.git-patchwork-notify@kernel.org> |
Hello: This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>: On Tue, 18 Aug 2026 15:47:21 +0800 you wrote: > In wx_ptp_set_timestamp_mode(), the driver copies the global `wx->flags` > bitmap to a local variable, modifies the PTP-related bits, and then writes > the entire bitmap back using memcpy(). > > This Read-Copy-Update pattern is unsafe and introduces a critical race > condition. Other asynchronous contexts (such as Tx timeout routines or > GPIO IRQ handlers) update individual bits in `wx->flags` concurrently > using atomic bitops like set_bit() or clear_bit(). The memcpy() write-back > can silently overwrite and drop these concurrent changes, potentially > causing the driver to miss critical module reset or PCIe recovery requests. > > [...] Here is the summary with links: - [net,v2] net: libwx: fix concurrent bitmap overwrite in PTP setup https://git.kernel.org/netdev/net/c/f05516dd7b86 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html