]> git.baikalelectronics.ru Git - kernel.git/commit
libnvdimm: prevent nvdimm from requesting key when security is disabled
authorDave Jiang <dave.jiang@intel.com>
Tue, 24 Sep 2019 17:34:49 +0000 (10:34 -0700)
committerDan Williams <dan.j.williams@intel.com>
Tue, 24 Sep 2019 17:30:10 +0000 (10:30 -0700)
commitc5be0fa0372f57dbd874cc2cfaef34ebc5933ae6
treef25b6549481ec5216506ad1af25266e6b2c630be
parenta79ca05c44af04c4034f81e3bf3c3c0d8fa5c063
libnvdimm: prevent nvdimm from requesting key when security is disabled

Current implementation attempts to request keys from the keyring even when
security is not enabled. Change behavior so when security is disabled it
will skip key request.

Error messages seen when no keys are installed and libnvdimm is loaded:

    request-key[4598]: Cannot find command to construct key 661489677
    request-key[4606]: Cannot find command to construct key 34713726

Cc: stable@vger.kernel.org
Fixes: 2f9381a5d515 ("acpi/nfit, libnvdimm: Add unlock of nvdimm support for Intel DIMMs")
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/156934642272.30222.5230162488753445916.stgit@djiang5-desk3.ch.intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/nvdimm/security.c