summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
diff options
context:
space:
mode:
authorMohsin Bashir <mohsin.bashr@gmail.com>2025-11-26 00:17:04 +0300
committerJakub Kicinski <kuba@kernel.org>2025-11-27 05:25:52 +0300
commit6d66e093e0740d39a36ef742c60eec247df26f41 (patch)
tree76b7a78b7aca72c814c6fdd8cfe537ac745a8dfd /drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
parent27fd02860164bfa78cec2640dfad630d832e302c (diff)
downloadlinux-6d66e093e0740d39a36ef742c60eec247df26f41.tar.xz
eth: fbnic: Fix counter roll-over issue
Fix a potential counter roll-over issue in fbnic_mbx_alloc_rx_msgs() when calculating descriptor slots. The issue occurs when head - tail results in a large positive value (unsigned) and the compiler interprets head - tail - 1 as a signed value. Since FBNIC_IPC_MBX_DESC_LEN is a power of two, use a masking operation, which is a common way of avoiding this problem when dealing with these sort of ring space calculations. Fixes: da3cde08209e ("eth: fbnic: Add FW communication mechanism") Signed-off-by: Mohsin Bashir <mohsin.bashr@gmail.com> Link: https://patch.msgid.link/20251125211704.3222413-1-mohsin.bashr@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c')
0 files changed, 0 insertions, 0 deletions