]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: add separate bounds checker for set/get helpers
authorDavid Sterba <dsterba@suse.com>
Thu, 30 Apr 2020 21:38:11 +0000 (23:38 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 25 May 2020 09:25:32 +0000 (11:25 +0200)
commit9ee9dcac81cb51eb9c5841a0438959654dfb42ed
tree602b0d8827e12450997f4938f35e4d65e8f5ce69
parent16533589f878045b9825535d58ea813b806a87c1
btrfs: add separate bounds checker for set/get helpers

The bounds checking is now done in map_private_extent_buffer but that
will be removed in following patches and some sanity checks should still
be done.

There are two separate checks to see the kind of out of bounds access:
partial (start offset is in the buffer) or complete (both start and end
are out).

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/struct-funcs.c