summaryrefslogtreecommitdiff
path: root/fs/btrfs/dev-replace.c
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mssola@mssola.com>2025-09-19 16:58:15 +0200
committerDavid Sterba <dsterba@suse.com>2025-09-23 08:49:25 +0200
commitf08d7147da5fb5ab4c26199dcbebb614283c99bb (patch)
tree21378b67cdaf7c93364c825530727a54ca6d9dc7 /fs/btrfs/dev-replace.c
parent98077f7f2180fa996710452564ebe71adc66af59 (diff)
btrfs: use kmalloc_array() for open-coded arithmetic in kmalloc()
As pointed out in the documentation, calling 'kmalloc' with open-coded arithmetic can lead to unfortunate overflows and this particular way of using it has been deprecated. Instead, it's preferred to use 'kmalloc_array' in cases where it might apply so an overflow check is performed. Note this is an API cleanup and is not fixing any overflows because in all cases the multipliers are bounded small numbers derived from number of items in leaves/nodes. Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/dev-replace.c')
0 files changed, 0 insertions, 0 deletions