diff options
| author | Jason Xing <[email protected]> | 2025-07-23 14:23:26 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2025-07-26 18:23:08 +0000 |
| commit | 2764ab51d5f0e8c7d3b7043af426b1883e3bde1d (patch) | |
| tree | a09806dd0dcf38373c5fd8645594a8b817670c43 /lib/crypto/mpi/mpicoder.c | |
| parent | Merge tag 'linux-can-fixes-for-6.16-20250725' of git://git.kernel.org/pub/scm... (diff) | |
| download | kernel-2764ab51d5f0e8c7d3b7043af426b1883e3bde1d.tar.gz kernel-2764ab51d5f0e8c7d3b7043af426b1883e3bde1d.zip | |
stmmac: xsk: fix negative overflow of budget in zerocopy mode
A negative overflow can happen when the budget number of descs are
consumed. as long as the budget is decreased to zero, it will again go
into while (budget-- > 0) statement and get decreased by one, so the
overflow issue can happen. It will lead to returning true whereas the
expected value should be false.
In this case where all the budget is used up, it means zc function
should return false to let the poll run again because normally we
might have more data to process. Without this patch, zc function would
return true instead.
Fixes: 132c32ee5bc0 ("net: stmmac: Add TX via XDP zero-copy socket")
Signed-off-by: Jason Xing <[email protected]>
Reviewed-by: Aleksandr Loktionov <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'lib/crypto/mpi/mpicoder.c')
0 files changed, 0 insertions, 0 deletions
