Patch "libnvdimm, dimm: clear 'locked' status on successful DIMM enable" has been added to the 4.14-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
libnvdimm, dimm: clear 'locked' status on successful DIMM enable
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
libnvdimm-dimm-clear-locked-status-on-successful-dimm-enable.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
d34cb808402898e53b9a9bcbbedd01667a78723bMon Sep 17 00:00:00 2001
From: Dan Williams <[email protected]>
Date: Mon, 25 Sep 2017 11:01:31 -0700
Subject: libnvdimm, dimm: clear 'locked' status on successful DIMM enable
From: Dan Williams <[email protected]>
commit d34cb808402898e53b9a9bcbbedd01667a78723b upstream.
If we successfully enable a DIMM then it must not be locked and we can clear the label-read failure condition. Otherwise, we need to reload the entire bus provider driver to achieve the same effect, and that can disrupt unrelated DIMMs and namespaces.
--- drivers/nvdimm/dimm.c | 1 + drivers/nvdimm/dimm_devs.c | 7 +++++++ drivers/nvdimm/nd.h | 1 + 3 files changed, 9 insertions(+)
drivers/nvdimm/dimm.c +1 -0
@@ -68,6 +68,7 @@ static int nvdimm_probe(struct device *d rc =nd_label_reserve_dpa (ndd);if (ndd->ns_current >=0 )nvdimm_set_aliasing (dev); +nvdimm_clear_locked (dev);nvdimm_bus_unlock (dev);if (rc)
drivers/nvdimm/dimm_devs.c +7 -0
@@ -200,6 +200,13 @@ void nvdimm_set_locked(struct device *deset_bit (NDD_LOCKED , &nvdimm->flags); } +void nvdimm_clear_locked (struct device *dev) +{ +struct nvdimm *nvdimm =to_nvdimm (dev); + +clear_bit (NDD_LOCKED , &nvdimm->flags); +} +static void nvdimm_release (struct device *dev) {struct nvdimm *nvdimm =to_nvdimm (dev);
drivers/nvdimm/nd.h +1 -0
@@ -254,6 +254,7 @@ long nvdimm_clear_poison(struct device * unsigned int len);void nvdimm_set_aliasing (struct device *dev);void nvdimm_set_locked (struct device *dev); +void nvdimm_clear_locked (struct device *dev);struct nd_btt *to_nd_btt (struct device *dev);struct nd_gen_sb {
Patches currently in stable-queue which might be from [email protected] are
queue-4.14/libnvdimm-dimm-clear-locked-status-on-successful-dimm-enable.patch queue-4.14/libnvdimm-pfn-make-resource-attribute-only-readable-by-root.patch queue-4.14/libnvdimm-region-make-resource-attribute-only-readable-by-root.patch queue-4.14/dax-fix-pmd-faults-on-zero-length-files.patch queue-4.14/libnvdimm-namespace-make-resource-attribute-only-readable-by-root.patch queue-4.14/dax-fix-general-protection-fault-in-dax_alloc_inode.patch queue-4.14/libnvdimm-namespace-fix-label-initialization-to-use-valid-seq-numbers.patch