summaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/xarray.py
diff options
context:
space:
mode:
authorThorsten Blum <thorsten.blum@linux.dev>2025-09-01 18:01:44 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-11-02 16:18:04 +0300
commit8e36ab6903b5856f983aa0b814f3ac55496bae36 (patch)
tree089ce09c739171a5ccc6b7092d3dd513eae289e1 /scripts/gdb/linux/xarray.py
parent9c50fde908c42b5698b31da5daa1a2d1b4d7a1a3 (diff)
downloadlinux-8e36ab6903b5856f983aa0b814f3ac55496bae36.tar.xz
btrfs: scrub: replace max_t()/min_t() with clamp() in scrub_throttle_dev_io()
[ Upstream commit a7f3dfb8293c4cee99743132d69863a92e8f4875 ] Replace max_t() followed by min_t() with a single clamp(). As was pointed by David Laight in https://lore.kernel.org/linux-btrfs/20250906122458.75dfc8f0@pumpkin/ the calculation may overflow u32 when the input value is too large, so clamp_t() is not used. In practice the expected values are in range of megabytes to gigabytes (throughput limit) so the bug would not happen. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Reviewed-by: David Sterba <dsterba@suse.com> [ Use clamp() and add explanation. ] Signed-off-by: David Sterba <dsterba@suse.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'scripts/gdb/linux/xarray.py')
0 files changed, 0 insertions, 0 deletions