diff options
| author | Mikulas Patocka <mpatocka@redhat.com> | 2026-10-09 18:16:02 +0200 |
|---|---|---|
| committer | Mikulas Patocka <mpatocka@redhat.com> | 2026-10-12 13:19:49 +0200 |
| commit | bbd6f974d0386036e560af332b6b8cdd17010a72 (patch) | |
| tree | 15c4d52bc4cd1cd1aac47f763543f4e6943135d6 /tools/lib/python | |
| parent | 829c4d21148a205eca864429e06530319e1f92d5 (diff) | |
dm-snapshot: make the chunk list sorted by the chunk number
Commit 8581b19eb2c5 ("dm-snapshot: fix 'scheduling while atomic' on
real-time kernels") replaced hlist_bl_for_each_entry with
hlist_for_each_entry, but the two iteration macros differ after the loop
ends: hlist_bl_for_each_entry leaves "e" pointing at the last element,
while hlist_for_each_entry() sets it to NULL.
The result is that the list is no longer sorted by chunk number as it was
intended to be. This bug doesn't cause data corruption because
dm_lookup_exception walks the full list.
Restore the invariant by tracking the list tail in the "prev" variable
and appending after it with hlist_add_behind.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Fixes: 8581b19eb2c5 ("dm-snapshot: fix 'scheduling while atomic' on real-time kernels")
Assisted-by: Claude:claude-opus-5
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions
