1
0
Fork 0
alistair23-linux/drivers/nvdimm
Jane Chu a6d5c5a398 libnvdimm/security: ensure sysfs poll thread woke up and fetch updated attr
[ Upstream commit 7f674025d9 ]

commit 7d988097c5 ("acpi/nfit, libnvdimm/security: Add security DSM overwrite support")
adds a sysfs_notify_dirent() to wake up userspace poll thread when the "overwrite"
operation has completed. But the notification is issued before the internal
dimm security state and flags have been updated, so the userspace poll thread
wakes up and fetches the not-yet-updated attr and falls back to sleep, forever.
But if user from another terminal issue "ndctl wait-overwrite nmemX" again,
the command returns instantly.

Link: https://lore.kernel.org/r/1596494499-9852-3-git-send-email-jane.chu@oracle.com
Fixes: 7d988097c5 ("acpi/nfit, libnvdimm/security: Add security DSM overwrite support")
Cc: Dave Jiang <dave.jiang@intel.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Jane Chu <jane.chu@oracle.com>
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-08-21 13:05:35 +02:00
..
Kconfig
Makefile
badrange.c
blk.c
btt.c
btt.h
btt_devs.c
bus.c
claim.c
core.c
dax_devs.c
dimm.c
dimm_devs.c
e820.c
label.c
label.h
namespace_devs.c
nd-core.h
nd.h
nd_virtio.c
of_pmem.c
pfn.h
pfn_devs.c
pmem.c
pmem.h
region.c
region_devs.c
security.c
virtio_pmem.c
virtio_pmem.h