Re: [PATCH][next] mailbox: PCC: check for negative count for parse failure checking

From: Dan Carpenter
Date: Wed May 30 2018 - 15:22:00 EST


On Wed, May 30, 2018 at 06:14:29PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@xxxxxxxxxxxxx>
>
> The function acpi_table_parse_enties_array can potentially return a
> negative value if parsing fails. Currently the check on the return
> is not checking for errors, so fix this by adding a -ve check too.
>

The impact is that kmallocs would immediately fail and give you a big
stack trace.

regards,
dan carpenter