On Fri, Oct 9, 2015 at 10:23 AM, Jeff Moyer <jmoyer@xxxxxxxxxx> wrote: > Vishal Verma <vishal.l.verma@xxxxxxxxx> writes: > >> If acpi_nfit_init is called (such as from nfit_test), with an nfit table >> that has more memory allocated than it needs (and a similarly large >> 'size' field, add_tables would happily keep adding null SPA Range tables >> filling up all available memory. >> >> Make it friendlier by breaking out if a 0-length header is found in any >> of the tables. > > Shouldn't that at least spew a warning? Or does the spec allow for > zero-length tables? > The spec allows for zero length tables but the firmware implementation should be self consistent and not report a total NFIT size that is greater than the sum of the size of the sub-structures. A warning / nudge to firmware developers to fix their stuff seems appropriate. -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html