diff options
| author | Mikulas Patocka <mpatocka@redhat.com> | 2026-07-09 21:29:11 +0200 |
|---|---|---|
| committer | Mikulas Patocka <mpatocka@redhat.com> | 2026-07-10 14:40:24 +0200 |
| commit | 366665416f20527ff7cad548a32d1ddf23195740 (patch) | |
| tree | c4e78655f1e1886e6c51291702bd4c7b0a4f4ed7 /drivers/md | |
| parent | 5a266764fadaff8b5c1fe37a186ebf9b09cb953e (diff) | |
| download | linux-next-366665416f20527ff7cad548a32d1ddf23195740.tar.gz linux-next-366665416f20527ff7cad548a32d1ddf23195740.zip | |
dm_early_create: fix freeing used table on dm_resume failure
If dm_resume fails, the kernel attempts to free table with
dm_table_destroy, but the table was already instantiated with
dm_swap_table. This commit skips the call to dm_table_destroy in this
case.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Assisted-by: Claude:claude-opus-4.6
Fixes: 6bbc923dfcf5 ("dm: add support to directly boot to a mapped device")
Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers/md')
| -rw-r--r-- | drivers/md/dm-ioctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c index ac77dc0ca225..1fa8bf835be0 100644 --- a/drivers/md/dm-ioctl.c +++ b/drivers/md/dm-ioctl.c @@ -2473,7 +2473,7 @@ int __init dm_early_create(struct dm_ioctl *dmi, /* resume device */ r = dm_resume(md); if (r) - goto err_destroy_table; + goto err_hash_remove; DMINFO("%s (%s) is ready", md->disk->disk_name, dmi->name); dm_put(md); |
