• Dan Williams's avatar
    libnvdimm/security: Require nvdimm_security_setup_events() to succeed · 1cd73865
    Dan Williams authored
    The following warning:
    
        ACPI0012:00: security event setup failed: -19
    
    ...is meant to capture exceptional failures of sysfs_get_dirent(),
    however it will also fail in the common case when security support is
    disabled. A few issues:
    
    1/ A dev_warn() report for a common case is too chatty
    2/ The setup of this notifier is generic, no need for it to be driven
       from the nfit driver, it can exist completely in the core.
    3/ If it fails for any reason besides security support being disabled,
       that's fatal and should abort DIMM activation. Userspace may hang if
       it never gets overwrite notifications.
    4/ The dirent needs to be released.
    
    Move the call to the core 'dimm' driver, make it conditional on security
    support being active, make it fatal for the exceptional case, add the
    missing sysfs_put() at device disable time.
    
    Fixes: 7d988097 ("...Add security DSM overwrite support")
    Reviewed-by: default avatarDave Jiang <dave.jiang@intel.com>
    Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
    1cd73865
Name
Last commit
Last update
..
Kconfig Loading commit data...
Makefile Loading commit data...
badrange.c Loading commit data...
blk.c Loading commit data...
btt.c Loading commit data...
btt.h Loading commit data...
btt_devs.c Loading commit data...
bus.c Loading commit data...
claim.c Loading commit data...
core.c Loading commit data...
dax_devs.c Loading commit data...
dimm.c Loading commit data...
dimm_devs.c Loading commit data...
e820.c Loading commit data...
label.c Loading commit data...
label.h Loading commit data...
namespace_devs.c Loading commit data...
nd-core.h Loading commit data...
nd.h Loading commit data...
of_pmem.c Loading commit data...
pfn.h Loading commit data...
pfn_devs.c Loading commit data...
pmem.c Loading commit data...
pmem.h Loading commit data...
region.c Loading commit data...
region_devs.c Loading commit data...
security.c Loading commit data...