Re: [PATCH net-next] net: fix token index wraparound in SO_DEVMEM_DONTNEED
From: Stanislav Fomichev
Date: Wed Nov 11 2026 - 17:22:48 EST
On 11/10, Xia Yan wrote:
> SO_DEVMEM_DONTNEED computes each index as token_start + j, in 32-bit
> unsigned arithmetic. A start of 0xfffffffe and a count of 4 produce
> indices 0xfffffffe, 0xffffffff, 0 and 1. Once the sum wraps, the loop
> can erase an existing low-numbered token from the same socket.
Sorry, I fail to understand what's the issue. This is (buggy) userspace
misusing the api and potentially removing different tokens, right?
So what are we fixing? Can you explain more?