From patchwork Fri Jun 22 15:35:10 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paul E. McKenney" X-Patchwork-Id: 9581 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id A2FF423E37 for ; Fri, 22 Jun 2012 15:42:12 +0000 (UTC) Received: from mail-yx0-f180.google.com (mail-yx0-f180.google.com [209.85.213.180]) by fiordland.canonical.com (Postfix) with ESMTP id 6B747A1878A for ; Fri, 22 Jun 2012 15:42:12 +0000 (UTC) Received: by yenq6 with SMTP id q6so1763120yen.11 for ; Fri, 22 Jun 2012 08:42:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-content-scanned:x-cbid:x-gm-message-state; bh=aopklbhWCLzMMX6oHXjAhbTiwAVZZW8BpAUNwdPWLHM=; b=OWR98HuoA6ig+U3o4maLspxhCxn5kCvyrkEziZx+yghYtvNQCV4WWxdJ2sRlpi9pmy GH4tfuTIU/2/44M86Zhtpr+2Aj/4rTWQu7CEZwFPe89lS0Gt7vOYWf+X8YTx7z+3yvrH BFIu8Fj8m8/l2Iz4DesirdFv5PBEHv9ckCKqydzwN+wL1F63vSXxNikVtWyu9i5dIW4M yK1YqrMCfXmGUZHhNgx1FQ+mofWbOAVTeJaRTBWYlB/nuBQmkiz0QE3woCb5Cc2wGK62 gvXPx8aa6bfmtfaxvZihh2till0XRC2gKphBBce843pTwa4s/wehlI8H8U9XSfq1exeN d9Bw== Received: by 10.50.193.196 with SMTP id hq4mr2140131igc.57.1340379728072; Fri, 22 Jun 2012 08:42:08 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.24.148 with SMTP id v20csp72680ibb; Fri, 22 Jun 2012 08:42:07 -0700 (PDT) Received: by 10.50.161.198 with SMTP id xu6mr2159896igb.69.1340379727553; Fri, 22 Jun 2012 08:42:07 -0700 (PDT) Received: from e31.co.us.ibm.com (e31.co.us.ibm.com. [32.97.110.149]) by mx.google.com with ESMTPS id vh4si10106906pbc.113.2012.06.22.08.42.07 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 22 Jun 2012 08:42:07 -0700 (PDT) Received-SPF: pass (google.com: domain of paulmck@linux.vnet.ibm.com designates 32.97.110.149 as permitted sender) client-ip=32.97.110.149; Authentication-Results: mx.google.com; spf=pass (google.com: domain of paulmck@linux.vnet.ibm.com designates 32.97.110.149 as permitted sender) smtp.mail=paulmck@linux.vnet.ibm.com Received: from /spool/local by e31.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 22 Jun 2012 09:42:04 -0600 Received: from d03dlp02.boulder.ibm.com (9.17.202.178) by e31.co.us.ibm.com (192.168.1.131) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 22 Jun 2012 09:35:50 -0600 Received: from d03relay03.boulder.ibm.com (d03relay03.boulder.ibm.com [9.17.195.228]) by d03dlp02.boulder.ibm.com (Postfix) with ESMTP id 828A93E40054 for ; Fri, 22 Jun 2012 15:35:35 +0000 (WET) Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167]) by d03relay03.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q5MFZLRV141040 for ; Fri, 22 Jun 2012 09:35:21 -0600 Received: from d03av01.boulder.ibm.com (loopback [127.0.0.1]) by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q5MFZFgD023202 for ; Fri, 22 Jun 2012 09:35:18 -0600 Received: from paulmck-ThinkPad-W500 ([9.47.24.152]) by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id q5MFZFQR023090; Fri, 22 Jun 2012 09:35:15 -0600 Received: by paulmck-ThinkPad-W500 (Postfix, from userid 1000) id 97115E71AF; Fri, 22 Jun 2012 08:35:15 -0700 (PDT) From: "Paul E. McKenney" To: linux-kernel@vger.kernel.org Cc: mingo@elte.hu, laijs@cn.fujitsu.com, dipankar@in.ibm.com, akpm@linux-foundation.org, mathieu.desnoyers@polymtl.ca, josh@joshtriplett.org, niv@us.ibm.com, tglx@linutronix.de, peterz@infradead.org, rostedt@goodmis.org, Valdis.Kletnieks@vt.edu, dhowells@redhat.com, eric.dumazet@gmail.com, darren@dvhart.com, fweisbec@gmail.com, sbw@mit.edu, patches@linaro.org, Carsten Emde , "Paul E. McKenney" Subject: [PATCH tip/core/rcu 15/17] Prevent uninitialized string in RCU stall info Date: Fri, 22 Jun 2012 08:35:10 -0700 Message-Id: <1340379312-6684-15-git-send-email-paulmck@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.8 In-Reply-To: <1340379312-6684-1-git-send-email-paulmck@linux.vnet.ibm.com> References: <20120622153501.GA6626@linux.vnet.ibm.com> <1340379312-6684-1-git-send-email-paulmck@linux.vnet.ibm.com> X-Content-Scanned: Fidelis XPS MAILER x-cbid: 12062215-7282-0000-0000-00000A327FD4 X-Gm-Message-State: ALoCoQmP3RQzTnFomuv2nfO5O05yEiZUgiNB9FCOhTQWUKKUSM8/uykPG7UW8Ap0OT5UwmxgI191 From: Carsten Emde An uninitialized string may be displayed at the end of the rcu_preempt detected stall info such as 0: (1 GPs behind) idle=075/140000000000000/0 =8?^D=8?^D ^^^^^^^^^^ if CONFIG_RCU_FAST_NO_HZ is not defined. This trivial patch clears the string in this case. Signed-off-by: Carsten Emde Signed-off-by: Paul E. McKenney --- kernel/rcutree_plugin.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h index d806186..321ba89 100644 --- a/kernel/rcutree_plugin.h +++ b/kernel/rcutree_plugin.h @@ -2205,6 +2205,7 @@ static void print_cpu_stall_fast_no_hz(char *cp, int cpu) static void print_cpu_stall_fast_no_hz(char *cp, int cpu) { + *cp = '\0'; } #endif /* #else #ifdef CONFIG_RCU_FAST_NO_HZ */