diff options
author | Paul Dagnelie <[email protected]> | 2020-12-11 10:22:29 -0800 |
---|---|---|
committer | GitHub <[email protected]> | 2020-12-11 10:22:29 -0800 |
commit | 7d4b365ce32ecaf97020178f2a847a01f7e35476 (patch) | |
tree | b6d8a64f43e2e2f2e178aa2be574a06b653ef313 /module/zfs/dmu.c | |
parent | 8c5606ca0b601faedf27ae7e21c5f528f824327c (diff) |
Fix kernel panic induced by redacted send
In the redaction list traversal code, there is a bug in the binary search
logic when looking for the resume point. Maxbufid can be decremented to -1,
causing us to read the last possible block of the object instead of the one we
wanted. This can cause incorrect resume behavior, or possibly even a hang in
some cases. In addition, when examining non-last blocks, we can treat the
block as being the same size as the last block, causing us to miss entries in
the redaction list when determining where to resume. Finally, we were ignoring
the case where the resume point was found in the buffer being searched, and
resuming from minbufid. All these issues have been corrected, and the code has
been significantly simplified to make future issues less likely.
Reviewed-by: Serapheim Dimitropoulos <[email protected]>
Reviewed-by: Matthew Ahrens <[email protected]>
Signed-off-by: Paul Dagnelie <[email protected]>
Closes #11297
Diffstat (limited to 'module/zfs/dmu.c')
0 files changed, 0 insertions, 0 deletions