mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
acpi/nfit: Block function zero DSMs
commit5e9e38d0dbupstream. In preparation for using function number 0 as an error value, prevent it from being considered a valid function value by acpi_nfit_ctl(). Cc: <stable@vger.kernel.org> Cc: stuart hayes <stuart.w.hayes@gmail.com> Fixes:e02fb7264d("nfit: add Microsoft NVDIMM DSM command set...") Reported-by: Jeff Moyer <jmoyer@redhat.com> Reviewed-by: Jeff Moyer <jmoyer@redhat.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
92fbac528f
commit
3cb00cfa3d
@@ -1764,6 +1764,13 @@ static int acpi_nfit_add_dimm(struct acpi_nfit_desc *acpi_desc,
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Function 0 is the command interrogation function, don't
|
||||
* export it to potential userspace use, and enable it to be
|
||||
* used as an error value in acpi_nfit_ctl().
|
||||
*/
|
||||
dsm_mask &= ~1UL;
|
||||
|
||||
guid = to_nfit_uuid(nfit_mem->family);
|
||||
for_each_set_bit(i, &dsm_mask, BITS_PER_LONG)
|
||||
if (acpi_check_dsm(adev_dimm->handle, guid,
|
||||
|
||||
Reference in New Issue
Block a user