Files
linux/fs/btrfs/extent-tree.c
Qu Wenruo a8bd4c0188 btrfs: trim: Check the range passed into to prevent overflow
[ Upstream commit 07301df7d2 ]

Normally the range->len is set to default value (U64_MAX), but when it's
not default value, we should check if the range overflows.

And if it overflows, return -EINVAL before doing anything.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-09-06 10:23:17 +02:00

313 KiB