diff options
| author | Ming-Hung Tsai <mtsai@redhat.com> | 2026-04-10 21:08:01 +0800 |
|---|---|---|
| committer | Mikulas Patocka <mpatocka@redhat.com> | 2026-04-10 15:16:06 +0200 |
| commit | 8c0ee19db81f0fa1ff25fd75b22b17c0cc2acde3 (patch) | |
| tree | 5e7f28af28d0a4164e0f1c2706b5bfe6f006baf8 /tools/perf/scripts/python/stackcollapse.py | |
| parent | 2fa49cc884f6496a915c35621ba4da35649bf159 (diff) | |
dm cache: fix missing return in invalidate_committed's error path
In passthrough mode, dm-cache defers write submission until after
metadata commit completes via the invalidate_committed() continuation.
On commit error, invalidate_committed() calls invalidate_complete() to
end the bio and free the migration struct, after which it should return
immediately.
The patch 4ca8b8bd952d ("dm cache: fix write hang in passthrough mode")
omitted this early return, causing execution to fall through into the
success path on error. This results in use-after-free on the migration
struct in the subsequent calls.
Fix by adding the missing return after the invalidate_complete() call.
Fixes: 4ca8b8bd952d ("dm cache: fix write hang in passthrough mode")
Reported-by: Dan Carpenter <error27@gmail.com>
Closes: https://lore.kernel.org/dm-devel/adjMq6T5RRjv_uxM@stanley.mountain/
Signed-off-by: Ming-Hung Tsai <mtsai@redhat.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
