diff options
author | Rob Norris <[email protected]> | 2024-07-05 13:39:33 +1000 |
---|---|---|
committer | Tony Hutter <[email protected]> | 2024-08-22 16:22:24 -0700 |
commit | a9c94bea9fb3bef7704d71cd9486fbcebbe6e9c8 (patch) | |
tree | 887d0cbeb2bbe92d240f1f8e99731c6d5492d97a /cmd/zinject | |
parent | f62e6e1f985b5cc197940dcd2dc839aab0708ca2 (diff) |
zio_compress_data: limit dest length to ABD size
Some callers (eg `do_corrective_recv()`) pass in a dest buffer much
smaller than the wanted 87.5% of the source buffer, because the
incoming abd is larger than the source data and they "know" what the
decompressed size with be.
However, `abd_borrow_buf()` rightly asserts if we try to borrow more
than is available, so these callers fail.
Previously when all we had was a dest buffer, we didn't know how big it
was, so we couldn't do anything. Now we have a dest abd, with a size, so
we can clamp dest size to the abd size.
Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Signed-off-by: Rob Norris <[email protected]>
Diffstat (limited to 'cmd/zinject')
0 files changed, 0 insertions, 0 deletions