[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <789c18d7-8227-4dfc-438a-2959448f9547@intel.com>
Date: Fri, 25 Aug 2023 08:09:31 -0700
From: Dave Jiang <dave.jiang@...el.com>
To: Yu Liao <liaoyu15@...wei.com>, <dan.j.williams@...el.com>,
<vishal.l.verma@...el.com>, <ira.weiny@...el.com>,
<rafael@...nel.org>
CC: <liwei391@...wei.com>, <lenb@...nel.org>, <robert.moore@...el.com>,
<linux-acpi@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] ACPI: NFIT: Fix incorrect calculation of idt size
On 8/24/23 20:59, Yu Liao wrote:
> Hi,
>
> A kindly ping, any comment on this?
You can add my review tag to both of your patches in the series. Please
cc nvdimm@...ts.linux.dev next time as well for nfit. Thanks!
Reviewed-by: Dave Jiang <dave.jiang@...el.com>
>
> Best regards,
> Yu
>
>
> On 2023/8/17 17:11, Yu Liao wrote:
>> acpi_nfit_interleave's field 'line_offset' is switched to flexible array [1],
>> but sizeof_idt() still calculates the size in the form of 1-element array.
>>
>> Therefore, fix incorrect calculation in sizeof_idt().
>>
>> [1] https://lore.kernel.org/lkml/2652195.BddDVKsqQX@kreacher/
>>
>> Fixes: 2a5ab99847bd ("ACPICA: struct acpi_nfit_interleave: Replace 1-element array with flexible array")
>> Cc: stable@...r.kernel.org # v6.4+
>> Signed-off-by: Yu Liao <liaoyu15@...wei.com>
>> ---
>> drivers/acpi/nfit/core.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c
>> index 07204d482968..305f590c54a8 100644
>> --- a/drivers/acpi/nfit/core.c
>> +++ b/drivers/acpi/nfit/core.c
>> @@ -855,7 +855,7 @@ static size_t sizeof_idt(struct acpi_nfit_interleave *idt)
>> {
>> if (idt->header.length < sizeof(*idt))
>> return 0;
>> - return sizeof(*idt) + sizeof(u32) * (idt->line_count - 1);
>> + return sizeof(*idt) + sizeof(u32) * idt->line_count;
>> }
>>
>> static bool add_idt(struct acpi_nfit_desc *acpi_desc,
>
Powered by blists - more mailing lists