linux/drivers/md
Genjian Zhang 4b22d0801f dm thin metadata: fix superblock refcount leak on snapshot shadow failure
__reserve_metadata_snap() increments THIN_SUPERBLOCK_LOCATION in the
metadata space map before shadowing it. When dm_tm_shadow_block()
fails, a reference is leaked in the metadata space map.

Fix by adding the missing dm_sm_dec_block().

Signed-off-by: Genjian Zhang <zhanggenjian@kylinos.cn>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Fixes: cc8394d86f ("dm thin: provide userspace access to pool metadata")
Cc: stable@vger.kernel.org
2026-07-11 15:18:51 +02:00
..
bcache bcache: fix uninitialized closure object 2026-04-03 05:11:08 -06:00
dm-pcache dm-pcache: reject option groups without values 2026-07-08 22:33:34 +02:00
dm-vdo - small cleanups in dm-vdo, dm-raid, dm-cache, dm-zoned-metadata 2026-06-16 13:20:54 +05:30
persistent-data dm-thin: fix metadata refcount underflow 2026-04-20 19:56:44 +02:00
dm-audit.c
dm-audit.h
dm-bio-prison-v1.c Convert 'alloc_flex' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
dm-bio-prison-v1.h
dm-bio-prison-v2.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
dm-bio-prison-v2.h
dm-bio-record.h
dm-bufio.c dm-bufio: fix wrong count calculation in dm_bufio_issue_discard 2026-07-10 18:39:17 +02:00
dm-builtin.c
dm-cache-background-tracker.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
dm-cache-background-tracker.h
dm-cache-block-types.h
dm-cache-metadata.c dm cache metadata: fix memory leak on metadata abort retry 2026-03-09 14:53:39 +01:00
dm-cache-metadata.h dm cache: prevent entering passthrough mode after unclean shutdown 2026-03-02 16:50:18 +01:00
dm-cache-policy-internal.h
dm-cache-policy-smq.c - small cleanups in dm-vdo, dm-raid, dm-cache, dm-zoned-metadata 2026-06-16 13:20:54 +05:30
dm-cache-policy.c
dm-cache-policy.h
dm-cache-target.c dm cache: fix missing return in invalidate_committed's error path 2026-04-10 15:16:06 +02:00
dm-clone-metadata.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
dm-clone-metadata.h
dm-clone-target.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
dm-core.h Revert "dm: fix a race condition in retrieve_deps" 2026-01-28 15:44:02 +01:00
dm-crypt.c dm-crypt: Make crypt_iv_operations::post return void 2026-03-30 12:06:33 +02:00
dm-delay.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
dm-dust.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
dm-ebs-target.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
dm-era-target.c dm era: fix error code propagation in era_ctr() 2026-07-08 22:33:35 +02:00
dm-exception-store.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
dm-exception-store.h dm-snapshot: fix 'scheduling while atomic' on real-time kernels 2025-12-10 19:28:22 +01:00
dm-flakey.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
dm-ima.c dm-ima: use active table's size if available 2026-05-04 14:53:52 +02:00
dm-ima.h dm-ima: use active table's size if available 2026-05-04 14:53:52 +02:00
dm-init.c dm init: ensure device probing has finished in dm-mod.waitfor= 2026-03-18 15:36:33 +01:00
dm-inlinecrypt.c dm-inlinecrypt: Fix an error handling path in inlinecrypt_ctr() 2026-07-08 22:33:35 +02:00
dm-integrity.c dm-integrity: fix a bug if the bio is out of limits 2026-07-10 14:39:47 +02:00
dm-io-rewind.c
dm-io-tracker.h
dm-io.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
dm-ioctl.c dm-ioctl: fix a possible overflow in list_version_get_info 2026-07-10 14:40:51 +02:00
dm-kcopyd.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
dm-linear.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
dm-log-userspace-base.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
dm-log-userspace-transfer.c
dm-log-userspace-transfer.h
dm-log-writes.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
dm-log.c dm-log: fix a bitset_size overflow on 32bit machines 2026-07-08 22:33:20 +02:00
dm-mpath.c dm-mpath: don't stop probing paths at presuspend 2026-03-02 16:54:36 +01:00
dm-mpath.h
dm-path-selector.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
dm-path-selector.h
dm-ps-historical-service-time.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
dm-ps-io-affinity.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
dm-ps-queue-length.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
dm-ps-round-robin.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
dm-ps-service-time.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
dm-raid.c dm-raid: only requeue bios when dm is suspending 2026-05-31 19:09:17 +08:00
dm-raid1.c dm mirror: fix integer overflow in create_dirty_log() 2026-03-02 18:43:12 +01:00
dm-region-hash.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
dm-rq.c block: switch numa_node to int in blk_mq_hw_ctx and init_request 2026-05-26 11:01:55 -06:00
dm-rq.h
dm-snap-persistent.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
dm-snap-transient.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
dm-snap.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
dm-stats.c dm-stats: fix dm_jiffies_to_msec64 2026-07-10 18:40:27 +02:00
dm-stats.h
dm-stripe.c Convert 'alloc_flex' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
dm-switch.c Convert 'alloc_flex' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
dm-sysfs.c dm: sysfs: use sysfs_emit() in dm-sysfs.c 2025-10-20 15:22:21 +02:00
dm-table.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
dm-target.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
dm-thin-metadata.c dm thin metadata: fix superblock refcount leak on snapshot shadow failure 2026-07-11 15:18:51 +02:00
dm-thin-metadata.h
dm-thin.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
dm-uevent.c
dm-uevent.h
dm-unstripe.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
dm-verity-fec.c dm-verity: fix buffer overflow in FEC calculation 2026-07-08 22:33:34 +02:00
dm-verity-fec.h dm-verity: fix buffer overflow in FEC calculation 2026-07-08 22:33:34 +02:00
dm-verity-loadpin.c dm-verity: fix a possible NULL pointer dereference 2026-07-10 14:41:43 +02:00
dm-verity-target.c dm-verity: make error counter atomic 2026-07-10 14:42:33 +02:00
dm-verity-verify-sig.c dm-verity: fix section mismatch error 2026-01-21 14:06:23 +01:00
dm-verity-verify-sig.h dm-verity: fix section mismatch error 2026-01-21 14:06:23 +01:00
dm-verity.h dm-verity: make error counter atomic 2026-07-10 14:42:33 +02:00
dm-writecache.c dm: provide helper to set stacked limits 2026-03-27 22:19:17 +01:00
dm-zero.c
dm-zone.c dm: use READ_ONCE in dm_blk_report_zones 2026-01-14 13:12:21 +01:00
dm-zoned-metadata.c dm-zoned-metadata: Use strscpy() to copy device name 2026-06-08 14:59:14 +02:00
dm-zoned-reclaim.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
dm-zoned-target.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
dm-zoned.h
dm.c dm: avoid leaking the caller's thread keyring via the table device file 2026-07-08 22:33:35 +02:00
dm.h block: introduce disk_report_zone() 2025-11-05 08:07:21 -07:00
Kconfig dm-inlinecrypt: add target for inline block device encryption 2026-05-12 12:58:13 +02:00
Makefile dm-inlinecrypt: add target for inline block device encryption 2026-05-12 12:58:13 +02:00
md-autodetect.c
md-bitmap.c md/raid1: honor REQ_NOWAIT when waiting for behind writes 2026-06-21 04:19:27 +08:00
md-bitmap.h md/raid1: honor REQ_NOWAIT when waiting for behind writes 2026-06-21 04:19:27 +08:00
md-cluster.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
md-cluster.h
md-linear.c Convert 'alloc_flex' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
md-llbitmap.c md/raid1: honor REQ_NOWAIT when waiting for behind writes 2026-06-21 04:19:27 +08:00
md.c md/raid1: honor REQ_NOWAIT when waiting for behind writes 2026-06-21 04:19:27 +08:00
md.h md/raid1,raid10: fix deadlock in read error recovery path 2026-05-31 19:09:18 +08:00
raid1-10.c md/raid1,raid10: don't fail devices for invalid IO errors 2026-04-28 20:44:37 +08:00
raid1.c md/raid1: protect head_position for read balance 2026-06-21 04:44:42 +08:00
raid1.h md: remove recovery_disabled 2026-01-26 13:17:38 +08:00
raid5-cache.c md/raid5: validate payload size before accessing journal metadata 2026-04-07 13:09:22 +08:00
raid5-log.h
raid5-ppl.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
raid5.c block-7.2-20260625 2026-06-25 09:56:47 -07:00
raid5.h md/raid5: validate discard support at request time 2026-06-21 03:16:24 +08:00
raid10.c md/raid10: fix writes_pending and barrier reference leaks on discard failures 2026-06-21 02:14:44 +08:00
raid10.h md: remove recovery_disabled 2026-01-26 13:17:38 +08:00
raid0.c Merge tag 'md-7.2-20260531' of https://git.kernel.org/pub/scm/linux/kernel/git/mdraid/linux into for-7.2/block 2026-06-01 12:52:20 -06:00
raid0.h