From: Chen Gang <gang.chen@asianux.com>
To: Thomas Gleixner <tglx@linutronix.de>, "H. Peter Anvin" <hpa@zytor.com>
Cc: "mingo@redhat.com" <mingo@redhat.com>,
Greg KH <gregkh@linuxfoundation.org>,
sebastian@breakpoint.cc, zhangyanfei@cn.fujitsu.com,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Linux-Arch <linux-arch@vger.kernel.org>
Subject: [PATCH] arch: x86: platform: mrst: pr_err() need notice that 'sdev->modalias' may not a NUL terminated string.
Date: Sun, 26 May 2013 16:50:22 +0800 [thread overview]
Message-ID: <51A1CCCE.1020103@asianux.com> (raw)
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@asianux.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
next reply other threads:[~2013-05-26 8:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-26 8:50 Chen Gang [this message]
2013-05-27 7:06 ` [PATCH] arch: x86: platform: mrst: pr_err() need notice that 'sdev->modalias' may not a NUL terminated string Sebastian Andrzej Siewior
2013-05-27 8:16 ` Chen Gang
2013-05-27 8:16 ` Chen Gang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51A1CCCE.1020103@asianux.com \
--to=gang.chen@asianux.com \
--cc=gregkh@linuxfoundation.org \
--cc=hpa@zytor.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=sebastian@breakpoint.cc \
--cc=tglx@linutronix.de \
--cc=zhangyanfei@cn.fujitsu.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.