diff options
| author | Mikulas Patocka <mpatocka@redhat.com> | 2026-11-06 19:38:45 +0100 |
|---|---|---|
| committer | Mikulas Patocka <mpatocka@redhat.com> | 2026-11-06 20:34:39 +0100 |
| commit | d12afc2f9ed6e14019fed9c02a74ad699915dc85 (patch) | |
| tree | 00d5a0f4b11fa12b2e171cc1e5d3c273e2b3403d /rust/kernel/alloc/kvec/errors.rs | |
| parent | 6fed9e26810f0b466dbcebe35a73d1fd48793ff5 (diff) | |
dm-cache: fix NULL pointer dereference on open failure
When __begin_transaction_flags in metadata_open fails,
dm_cache_metadata_close is called. dm_cache_metadata_close attempts to
execute list_del(&cmd->list);, but the "cmd" object is not on any list
yet, thus it crashes with NULL pointer dereference.
Fix this by initializing cmd->list after cmd is allocated.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Assisted-by: Claude:claude-opus-5
Cc: stable@vger.kernel.org
Fixes: 9b1cc9f251af ("dm cache: share cache-metadata object across inactive and active DM tables")
Diffstat (limited to 'rust/kernel/alloc/kvec/errors.rs')
0 files changed, 0 insertions, 0 deletions
