summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorJérémy Jean <Jeremy.Jean@oss.cyber.gouv.fr>2026-09-14 20:42:38 +0000
committerAnna Schumaker <anna.schumaker@hammerspace.com>2026-09-22 09:23:56 -0400
commit6ecf1b509f15b0e005dca548ef906d8842b22449 (patch)
tree6818095a4568b7085c8ba13b9a1c46358bd7793f /include/linux
parent792c80e8240fc05642fe5e35d988e25bd0eceba2 (diff)
downloadlinux-next-6ecf1b509f15b0e005dca548ef906d8842b22449.tar.gz
linux-next-6ecf1b509f15b0e005dca548ef906d8842b22449.zip
NFS: filelayout: calculate dense stripe width in 64 bits
filelayout_get_dense_offset() calculates the stripe width from the stripe unit and count, where both values are provided by the server. Their product is stored on 32 bits, and can wrap to zero despite passing individual checks. For example, a 1 GiB stripe unit (0x40000000) and four stripes (4) cause the following div_u64() to raise a divide error during the first read through the dense layout. Update u32 to u64 and use div64_u64() instead of div_u64(). stripe_unit is a u32 and stripe_count is limited to 4096, so the product cannot overflow a u64. Fixes: cfe7f4120f8b ("NFSv4.1: filelayout i/o helpers") Assisted-by: Codex:gpt-5 Signed-off-by: Jérémy Jean <Jeremy.Jean@oss.cyber.gouv.fr> Signed-off-by: Anna Schumaker <anna.schumaker@hammerspace.com>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions