Skip to content

Commit 266c7bf

Browse files
davejiangdjbw
authored andcommitted
nfit_test: fix security state pull for nvdimm security nfit_test
The override status function needs to be updated to use the proper request parameter in order to get the security state. Fixes: 3c13e2a ("...Add test support for Intel nvdimm security DSMs") Reported-by: Vishal Verma <vishal.l.verma@intel.com> Signed-off-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
1 parent 49a5785 commit 266c7bf

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎tools/testing/nvdimm/dimm_devs.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ ssize_t security_show(struct device *dev,
1818
* For the test version we need to poll the "hardware" in order
1919
* to get the updated status for unlock testing.
2020
*/
21-
nvdimm->sec.state = nvdimm_security_state(nvdimm, false);
22-
nvdimm->sec.ext_state = nvdimm_security_state(nvdimm, true);
21+
nvdimm->sec.state = nvdimm_security_state(nvdimm, NVDIMM_USER);
22+
nvdimm->sec.ext_state = nvdimm_security_state(nvdimm, NVDIMM_MASTER);
2323

2424
switch (nvdimm->sec.state) {
2525
case NVDIMM_SECURITY_DISABLED:

0 commit comments

Comments
 (0)