]> www.infradead.org Git - users/jedix/linux-maple.git/commit
nfit: Account for table size length variation
authorLinda Knippers <linda.knippers@hpe.com>
Sat, 21 Nov 2015 00:05:47 +0000 (19:05 -0500)
committerDan Duval <dan.duval@oracle.com>
Wed, 7 Dec 2016 17:25:22 +0000 (12:25 -0500)
commit7f7bb433488dd6c90f0d683ee33380f48b3a9818
tree39d1a73033ef66f75b5ae5cbf86e99aca5850ef6
parentc0d5a203ff6b7bf101765a452f71e4a4034d1134
nfit: Account for table size length variation

Orabug: 22913653

The size of NFIT tables don't necessarily match the size of the
data structures that we use for them.  For example, the NVDIMM
Control Region Structure table is shorter for a device with
no block control windows than for a device with block control windows.
Other tables, such as Flush Hint Address Structure and the Interleave
Structure are variable length by definition.

Account for the size difference when comparing table entries by
using the actual table size from the table header if it's less
than the structure size.

Signed-off-by: Linda Knippers <linda.knippers@hpe.com>
Acked-by: Vishal Verma <vishal.l.verma@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
(cherry picked from commit 826c416f3c9493b69630a811832cfb7c9007f840)
Signed-off-by: Dan Duval <dan.duval@oracle.com>
drivers/acpi/nfit.c