[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <51A1CCCE.1020103@asianux.com>
Date: Sun, 26 May 2013 16:50:22 +0800
From: Chen Gang <gang.chen@...anux.com>
To: Thomas Gleixner <tglx@...utronix.de>,
"H. Peter Anvin" <hpa@...or.com>
CC: "mingo@...hat.com" <mingo@...hat.com>,
Greg KH <gregkh@...uxfoundation.org>, sebastian@...akpoint.cc,
zhangyanfei@...fujitsu.com,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Linux-Arch <linux-arch@...r.kernel.org>
Subject: [PATCH] arch: x86: platform: mrst: pr_err() need notice that 'sdev->modalias'
may not a NUL terminated string.
According to the areas which use "%16.16s" within this file, the
'sdev->modalias' may not always be a NUL terminated string.
So need use "%.16s" instead of "%s" in pr_err(), or may cause issue.
Signed-off-by: Chen Gang <gang.chen@...anux.com>
---
arch/x86/platform/mrst/mrst.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/platform/mrst/mrst.c b/arch/x86/platform/mrst/mrst.c
index a0a0a43..e2e069c 100644
--- a/arch/x86/platform/mrst/mrst.c
+++ b/arch/x86/platform/mrst/mrst.c
@@ -746,7 +746,7 @@ static void __init intel_scu_spi_device_register(struct spi_board_info *sdev)
new_dev = kzalloc(sizeof(*sdev), GFP_KERNEL);
if (!new_dev) {
- pr_err("failed to alloc mem for delayed spi dev %s\n",
+ pr_err("failed to alloc mem for delayed spi dev %.16s\n",
sdev->modalias);
return;
}
--
1.7.7.6
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists