Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752335AbbBKKK2 (ORCPT ); Wed, 11 Feb 2015 05:10:28 -0500 Received: from mail-pa0-f52.google.com ([209.85.220.52]:51177 "EHLO mail-pa0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752272AbbBKKK0 (ORCPT ); Wed, 11 Feb 2015 05:10:26 -0500 Message-ID: <54DB2A90.4070902@linaro.org> Date: Wed, 11 Feb 2015 12:10:24 +0200 From: Ivan Khoronzhuk User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Ard Biesheuvel CC: Matt Fleming , Leif Lindholm , "linux-kernel@vger.kernel.org" Subject: Re: [Patch 2/3] firmware: dmi_scan: fix dmi_len type References: <1423647992-3787-1-git-send-email-ivan.khoronzhuk@linaro.org> <1423647992-3787-3-git-send-email-ivan.khoronzhuk@linaro.org> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1053 Lines: 25 On 02/11/2015 11:53 AM, Ard Biesheuvel wrote: > On 11 February 2015 at 17:46, Ivan Khoronzhuk > wrote: >> According to SMBIOSv3 specification the length of DMI table can be >> up to 32bits wide. So use appropriate type to avoid overflow. >> >> It's obvious that dmi_num theoretically can be more than u16 also, >> so it's can be changed to u32 or at least it's better to use int >> instead of u16, but on that moment I cannot imagine dmi structure >> count more than 65535 and it can require changing type of vars that >> work with it. So I didn't correct it. >> >> Signed-off-by: Ivan Khoronzhuk > Acked-by: Ard Biesheuvel > > This should get a cc stable as well. > Pay attention that this patch has to be applied with patch 1/3. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/