From mboxrd@z Thu Jan 1 00:00:00 1970 From: Len Brown Subject: [PATCH 60/76] ACPI, APEI, Fix ERST header length check Date: Fri, 30 Mar 2012 06:14:03 -0400 Message-ID: <7ed28f2ed43ece424ff2fa4dedac7928bb37a23a.1333101989.git.len.brown@intel.com> References: <1333102459-23750-1-git-send-email-lenb@kernel.org> Reply-To: Len Brown Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-reply-to: <1333102459-23750-1-git-send-email-lenb@kernel.org> In-reply-to: <09f98a825a821f7a3f1b162f9ed023f37213a63b.1333101989.git.len.brown@intel.com> References: <09f98a825a821f7a3f1b162f9ed023f37213a63b.1333101989.git.len.brown@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-pm-bounces@lists.linux-foundation.org Errors-To: linux-pm-bounces@lists.linux-foundation.org To: linux-acpi@vger.kernel.org, linux-pm@lists.linux-foundation.org Cc: Len Brown , linux-kernel@vger.kernel.org, Jiang Liu , Jiang Liu List-Id: linux-pm@vger.kernel.org From: Jiang Liu This fixes a trivial copy & paste error in ERST header length check. It's just for future safety because sizeof(struct acpi_table_einj) equals to sizeof(struct acpi_table_erst) with current ACPI5.0 specification. It applies to v3.3-rc6. Signed-off-by: Jiang Liu Acked-by: Huang Ying Signed-off-by: Len Brown --- drivers/acpi/apei/erst.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/apei/erst.c b/drivers/acpi/apei/erst.c index eb9fab5..e4d9d24 100644 --- a/drivers/acpi/apei/erst.c +++ b/drivers/acpi/apei/erst.c @@ -917,7 +917,7 @@ static int erst_check_table(struct acpi_table_erst *erst_tab) { if ((erst_tab->header_length != (sizeof(struct acpi_table_erst) - sizeof(erst_tab->header))) - && (erst_tab->header_length != sizeof(struct acpi_table_einj))) + && (erst_tab->header_length != sizeof(struct acpi_table_erst))) return -EINVAL; if (erst_tab->header.length < sizeof(struct acpi_table_erst)) return -EINVAL; -- 1.7.10.rc2.19.gfae9d