linux-brain/drivers/nvdimm
Dan Williams ddcf807fbb libnvdimm/region: Fix label activation vs errors
commit d9cee9f85b22fab88d2b76d2e92b18e3d0e6aa8c upstream.

There are a few scenarios where init_active_labels() can return without
registering deactivate_labels() to run when the region is disabled. In
particular label error injection creates scenarios where a DIMM is
disabled, but labels on other DIMMs in the region become activated.

Arrange for init_active_labels() to always register deactivate_labels().

Reported-by: Krzysztof Kensicki <krzysztof.kensicki@intel.com>
Cc: <stable@vger.kernel.org>
Fixes: bf9bccc14c ("libnvdimm: pmem label sets and namespace instantiation.")
Reviewed-by: Jeff Moyer <jmoyer@redhat.com>
Link: https://lore.kernel.org/r/162766356450.3223041.1183118139023841447.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-18 08:56:57 +02:00
..
Kconfig libnvdimm: Enable unit test infrastructure compile checks 2019-09-07 04:28:05 -03:00
Makefile libnvdimm: Enable unit test infrastructure compile checks 2019-09-07 04:28:05 -03:00
badrange.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 295 2019-06-05 17:36:38 +02:00
blk.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 288 2019-06-05 17:36:37 +02:00
btt.c libnvdimm/btt: fix variable 'rc' set but not used 2020-01-04 19:18:12 +01:00
btt.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 288 2019-06-05 17:36:37 +02:00
btt_devs.c driver-core, libnvdimm: Let device subsystems add local lockdep coverage 2019-07-18 16:23:27 -07:00
bus.c libnvdimm: Out of bounds read in __nd_ioctl() 2020-04-23 10:36:42 +02:00
claim.c libnvdimm: nd_region flush callback support 2019-07-05 15:19:10 -07:00
core.c driver-core, libnvdimm: Let device subsystems add local lockdep coverage 2019-07-18 16:23:27 -07:00
dax_devs.c libnvdimm/pfn: fix fsdax-mode namespace info-block zero-fields 2019-07-18 17:08:07 -07:00
dimm.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 295 2019-06-05 17:36:38 +02:00
dimm_devs.c libnvdimm/dimm: Avoid race between probe and available_slots_show() 2021-02-10 09:25:30 +01:00
e820.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
label.c libnvdimm/namespace: Fix reaping of invalidated block-window-namespace labels 2020-12-30 11:51:47 +01:00
label.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 295 2019-06-05 17:36:38 +02:00
namespace_devs.c libnvdimm/region: Fix label activation vs errors 2021-08-18 08:56:57 +02:00
nd-core.h libnvdimm/region: Rewrite _probe_success() to _advance_seeds() 2019-09-05 16:11:14 -07:00
nd.h libnvdimm/dax: Pick the right alignment default when creating dax devices 2019-09-24 10:23:41 -07:00
nd_virtio.c virtio_pmem: fix sparse warning 2019-07-16 19:44:26 -07:00
of_pmem.c libnvdimm/of_pmem: Provide a unique name for bus provider 2019-08-13 20:31:57 -07:00
pfn.h libnvdimm/pfn_dev: Add page size and struct page size to pfn superblock 2019-09-05 16:11:14 -07:00
pfn_devs.c libnvdimm fixes v5.4-rc1 2019-09-29 10:33:41 -07:00
pmem.c libnvdimm/pmem: Advance namespace seed for specific probe errors 2019-09-05 16:11:14 -07:00
pmem.h libnvdimm, pmem: Restore page attributes when clearing errors 2018-08-20 09:22:45 -07:00
region.c libnvdimm/region: Initialize bad block for volatile namespaces 2019-09-24 10:27:51 -07:00
region_devs.c libnvdimm/region: Fix nvdimm_has_flush() to handle ND_REGION_ASYNC 2021-04-21 12:56:16 +02:00
security.c libnvdimm/security: ensure sysfs poll thread woke up and fetch updated attr 2020-08-21 13:05:35 +02:00
virtio_pmem.c virtio-pmem: Add virtio pmem driver 2019-07-05 15:19:10 -07:00
virtio_pmem.h virtio-pmem: Add virtio pmem driver 2019-07-05 15:19:10 -07:00