aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace
diff options
context:
space:
mode:
authorPaolo Bonzini <[email protected]>2021-11-22 19:50:28 -0500
committerPaolo Bonzini <[email protected]>2021-11-30 03:54:11 -0500
commit4674164f0ac5fd553c38b2b8c49fe13297fed38b (patch)
tree6432e486463d16e0b5e68465019547b8949116b7 /tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace
parent53b7ca1a359389276c76fbc9e1009d8626a17e40 (diff)
KVM: SEV: do not use list_replace_init on an empty list
list_replace_init cannot be used if the source is an empty list, because "new->next->prev = new" will overwrite "old->next": new old prev = new, next = new prev = old, next = old new->next = old->next prev = new, next = old prev = old, next = old new->next->prev = new prev = new, next = old prev = old, next = new new->prev = old->prev prev = old, next = old prev = old, next = old new->next->prev = new prev = old, next = old prev = new, next = new The desired outcome instead would be to leave both old and new the same as they were (two empty circular lists). Use list_cut_before, which already has the necessary check and is documented to discard the previous contents of the list that will hold the result. Fixes: b56639318bb2 ("KVM: SEV: Add support for SEV intra host migration") Reviewed-by: Sean Christopherson <[email protected]> Message-Id: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace')
0 files changed, 0 insertions, 0 deletions