From patchwork Tue Feb 24 14:48:18 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Henrique de Moraes Holschuh X-Patchwork-Id: 8598 X-Patchwork-Delegate: lenb@kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n1OEmjJQ003228 for ; Tue, 24 Feb 2009 14:48:45 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756569AbZBXOsY (ORCPT ); Tue, 24 Feb 2009 09:48:24 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756567AbZBXOsY (ORCPT ); Tue, 24 Feb 2009 09:48:24 -0500 Received: from out3.smtp.messagingengine.com ([66.111.4.27]:38653 "EHLO out3.smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755330AbZBXOsX (ORCPT ); Tue, 24 Feb 2009 09:48:23 -0500 Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id 9077D2A3E88; Tue, 24 Feb 2009 09:48:21 -0500 (EST) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute1.internal (MEProxy); Tue, 24 Feb 2009 09:48:21 -0500 X-Sasl-enc: BBjjhZ1Cwd7IqapJksaONVFBlCNpEco7X79hpYQx2J4p 1235486901 Received: from khazad-dum.debian.net (unknown [201.82.166.239]) by mail.messagingengine.com (Postfix) with ESMTPSA id 445D032662; Tue, 24 Feb 2009 09:48:21 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by localhost.khazad-dum.debian.net (Postfix) with ESMTP id CA46628262; Tue, 24 Feb 2009 11:48:18 -0300 (BRT) X-Virus-Scanned: Debian amavisd-new at khazad-dum.debian.net Received: from khazad-dum.debian.net ([127.0.0.1]) by localhost (khazad-dum.debian.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Ndg7i3Aw21CH; Tue, 24 Feb 2009 11:48:18 -0300 (BRT) Received: by khazad-dum.debian.net (Postfix, from userid 1000) id 47A312808C; Tue, 24 Feb 2009 11:48:18 -0300 (BRT) From: Henrique de Moraes Holschuh To: Len Brown Cc: stable@kernel.org, linux-acpi@vger.kernel.org, Henrique de Moraes Holschuh , Lin Ming Subject: [PATCH 2/2] ACPI: fix broken usage of acpi_ut_get_node_name() Date: Tue, 24 Feb 2009 11:48:18 -0300 Message-Id: <1235486898-27756-2-git-send-email-hmh@hmh.eng.br> X-Mailer: git-send-email 1.5.6.5 In-Reply-To: <1235486898-27756-1-git-send-email-hmh@hmh.eng.br> References: <1235486898-27756-1-git-send-email-hmh@hmh.eng.br> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org acpi_ut_get_node_name() returns a four char fixed-size array, not NULL-terminated. This issue was fixed indirectly in mainline by commit 60a4ce7f4148155d3f28eea4a213f7ee47cd57b7. This is the minimal fix for stable 2.6.28. Signed-off-by: Henrique de Moraes Holschuh Cc: stable@kernel.org Cc: Lin Ming --- drivers/acpi/power.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c index bb7d50d..ad55db1 100644 --- a/drivers/acpi/power.c +++ b/drivers/acpi/power.c @@ -151,7 +151,7 @@ static int acpi_power_get_state(acpi_handle handle, int *state) *state = (sta & 0x01)?ACPI_POWER_RESOURCE_STATE_ON: ACPI_POWER_RESOURCE_STATE_OFF; - ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Resource [%s] is %s\n", + ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Resource [%4.4s] is %s\n", acpi_ut_get_node_name(handle), *state ? "on" : "off"));