mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-02 16:44:10 +08:00
2995fa78e4
This reverts commit be35f48610
("dm: wait until embedded kobject is
released before destroying a device") and provides an improved fix.
The kobject release code that calls the completion must be placed in a
non-module file, otherwise there is a module unload race (if the process
calling dm_kobject_release is preempted and the DM module unloaded after
the completion is triggered, but before dm_kobject_release returns).
To fix this race, this patch moves the completion code to dm-builtin.c
which is always compiled directly into the kernel if BLK_DEV_DM is
selected.
The patch introduces a new dm_kobject_holder structure, its purpose is
to keep the completion and kobject in one place, so that it can be
accessed from non-module code without the need to export the layout of
struct mapped_device to that code.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Cc: stable@vger.kernel.org
60 lines
2.2 KiB
Makefile
60 lines
2.2 KiB
Makefile
#
|
|
# Makefile for the kernel software RAID and LVM drivers.
|
|
#
|
|
|
|
dm-mod-y += dm.o dm-table.o dm-target.o dm-linear.o dm-stripe.o \
|
|
dm-ioctl.o dm-io.o dm-kcopyd.o dm-sysfs.o dm-stats.o
|
|
dm-multipath-y += dm-path-selector.o dm-mpath.o
|
|
dm-snapshot-y += dm-snap.o dm-exception-store.o dm-snap-transient.o \
|
|
dm-snap-persistent.o
|
|
dm-mirror-y += dm-raid1.o
|
|
dm-log-userspace-y \
|
|
+= dm-log-userspace-base.o dm-log-userspace-transfer.o
|
|
dm-thin-pool-y += dm-thin.o dm-thin-metadata.o
|
|
dm-cache-y += dm-cache-target.o dm-cache-metadata.o dm-cache-policy.o
|
|
dm-cache-mq-y += dm-cache-policy-mq.o
|
|
dm-cache-cleaner-y += dm-cache-policy-cleaner.o
|
|
md-mod-y += md.o bitmap.o
|
|
raid456-y += raid5.o
|
|
|
|
# Note: link order is important. All raid personalities
|
|
# and must come before md.o, as they each initialise
|
|
# themselves, and md.o may use the personalities when it
|
|
# auto-initialised.
|
|
|
|
obj-$(CONFIG_MD_LINEAR) += linear.o
|
|
obj-$(CONFIG_MD_RAID0) += raid0.o
|
|
obj-$(CONFIG_MD_RAID1) += raid1.o
|
|
obj-$(CONFIG_MD_RAID10) += raid10.o
|
|
obj-$(CONFIG_MD_RAID456) += raid456.o
|
|
obj-$(CONFIG_MD_MULTIPATH) += multipath.o
|
|
obj-$(CONFIG_MD_FAULTY) += faulty.o
|
|
obj-$(CONFIG_BCACHE) += bcache/
|
|
obj-$(CONFIG_BLK_DEV_MD) += md-mod.o
|
|
obj-$(CONFIG_BLK_DEV_DM) += dm-mod.o
|
|
obj-$(CONFIG_BLK_DEV_DM_BUILTIN) += dm-builtin.o
|
|
obj-$(CONFIG_DM_BUFIO) += dm-bufio.o
|
|
obj-$(CONFIG_DM_BIO_PRISON) += dm-bio-prison.o
|
|
obj-$(CONFIG_DM_CRYPT) += dm-crypt.o
|
|
obj-$(CONFIG_DM_DELAY) += dm-delay.o
|
|
obj-$(CONFIG_DM_FLAKEY) += dm-flakey.o
|
|
obj-$(CONFIG_DM_MULTIPATH) += dm-multipath.o dm-round-robin.o
|
|
obj-$(CONFIG_DM_MULTIPATH_QL) += dm-queue-length.o
|
|
obj-$(CONFIG_DM_MULTIPATH_ST) += dm-service-time.o
|
|
obj-$(CONFIG_DM_SWITCH) += dm-switch.o
|
|
obj-$(CONFIG_DM_SNAPSHOT) += dm-snapshot.o
|
|
obj-$(CONFIG_DM_PERSISTENT_DATA) += persistent-data/
|
|
obj-$(CONFIG_DM_MIRROR) += dm-mirror.o dm-log.o dm-region-hash.o
|
|
obj-$(CONFIG_DM_LOG_USERSPACE) += dm-log-userspace.o
|
|
obj-$(CONFIG_DM_ZERO) += dm-zero.o
|
|
obj-$(CONFIG_DM_RAID) += dm-raid.o
|
|
obj-$(CONFIG_DM_THIN_PROVISIONING) += dm-thin-pool.o
|
|
obj-$(CONFIG_DM_VERITY) += dm-verity.o
|
|
obj-$(CONFIG_DM_CACHE) += dm-cache.o
|
|
obj-$(CONFIG_DM_CACHE_MQ) += dm-cache-mq.o
|
|
obj-$(CONFIG_DM_CACHE_CLEANER) += dm-cache-cleaner.o
|
|
|
|
ifeq ($(CONFIG_DM_UEVENT),y)
|
|
dm-mod-objs += dm-uevent.o
|
|
endif
|