diff options
author | Jakub Kicinski <kuba@kernel.org> | 2023-10-05 13:16:31 -0700 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-10-05 13:16:47 -0700 |
commit | 2606cf059c56bfb86d5d6bd0f41bd7eedefc8b0a (patch) | |
tree | 6bd918ad4fc55e677cc6ccb3212eab873c467c7f /fs/btrfs/extent_io.c | |
parent | 49e7265fd098fdade2bbdd9331e6b914cda7fa83 (diff) | |
parent | f291209eca5eba0b4704fa0832af57b12dbc1a02 (diff) | |
download | linux-2606cf059c56bfb86d5d6bd0f41bd7eedefc8b0a.tar.gz linux-2606cf059c56bfb86d5d6bd0f41bd7eedefc8b0a.tar.bz2 linux-2606cf059c56bfb86d5d6bd0f41bd7eedefc8b0a.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Cross-merge networking fixes after downstream PR.
No conflicts (or adjacent changes of note).
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'fs/btrfs/extent_io.c')
-rw-r--r-- | fs/btrfs/extent_io.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 6954ae763b86..caccd0376342 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -3995,8 +3995,14 @@ void read_extent_buffer(const struct extent_buffer *eb, void *dstv, char *dst = (char *)dstv; unsigned long i = get_eb_page_index(start); - if (check_eb_range(eb, start, len)) + if (check_eb_range(eb, start, len)) { + /* + * Invalid range hit, reset the memory, so callers won't get + * some random garbage for their uninitialzed memory. + */ + memset(dstv, 0, len); return; + } offset = get_eb_offset_in_page(eb, start); |